home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc A) / Acorn User China CD-ROM (UK) (Disc A).bin / StrongHelp_Manuals / jpeg / Jpeg
Unknown  |  1996-06-10  |  13.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default
100% gt2 Kopftext: 'HELP(' default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 48 45 4c 50 28 00 00 00 | c9 00 00 00 ff ff ff ff |HELP(...|........|
|00000010| 2c 00 00 00 00 fd ff ff | 00 00 00 00 b0 00 00 00 |,.......|........|
|00000020| 00 01 00 00 00 00 00 00 | 24 00 00 00 44 49 52 24 |........|$...DIR$|
|00000030| b8 00 00 00 b8 00 00 00 | e4 00 00 00 46 fd ff ff |........|....F...|
|00000040| aa f2 4a dc 1c 01 00 00 | 13 01 00 00 00 00 00 00 |..J.....|........|
|00000050| 4a 50 45 47 5f 00 00 00 | d8 2b 00 00 46 fd ff ff |JPEG_...|.+..F...|
|00000060| 1f f3 4a dc 70 00 00 00 | 13 01 00 00 00 00 00 00 |..J.p...|........|
|00000070| 43 6f 6d 70 72 65 73 73 | 4a 50 45 47 5f 00 00 00 |Compress|JPEG_...|
|00000080| 28 34 00 00 46 fd ff ff | 74 5a 06 d8 24 00 00 00 |(4..F...|tZ..$...|
|00000090| 13 00 00 00 00 00 00 00 | 21 43 6f 6e 66 69 67 75 |........|!Configu|
|000000a0| 72 65 00 00 4c 34 00 00 | 45 fc ff ff c3 d8 0e e3 |re..L4..|E.......|
|000000b0| 20 00 00 00 13 00 00 00 | 00 00 00 00 21 50 72 65 | .......|....!Pre|
|000000c0| 00 00 00 00 6c 34 00 00 | 46 fd ff ff 4d 8d 42 dc |....l4..|F...M.B.|
|000000d0| f0 01 00 00 13 00 00 00 | 00 00 00 00 21 52 6f 6f |........|....!Roo|
|000000e0| 74 00 00 00 44 49 52 24 | 1c 01 00 00 1c 01 00 00 |t...DIR$|........|
|000000f0| 00 02 00 00 46 ff ff ff | a5 b8 41 dc 47 04 00 00 |....F...|..A.G...|
|00000100| 13 00 00 00 00 00 00 00 | 49 6e 66 6f 00 00 00 00 |........|Info....|
|00000110| 48 06 00 00 46 ff ff ff | 02 09 43 dc 41 04 00 00 |H...F...|..C.A...|
|00000120| 13 00 00 00 00 00 00 00 | 46 69 6c 65 49 6e 66 6f |........|FileInfo|
|00000130| 00 00 00 00 8c 0a 00 00 | 46 ff ff ff 4c 48 44 dc |........|F...LHD.|
|00000140| 56 06 00 00 13 00 00 00 | 00 00 00 00 50 6c 6f 74 |V.......|....Plot|
|00000150| 53 63 61 6c 65 64 00 00 | e4 10 00 00 46 ff ff ff |Scaled..|....F...|
|00000160| 36 3a 4a dc 6e 08 00 00 | 13 00 00 00 00 00 00 00 |6:J.n...|........|
|00000170| 50 6c 6f 74 46 69 6c 65 | 53 63 61 6c 65 64 00 00 |PlotFile|Scaled..|
|00000180| 54 19 00 00 46 ff ff ff | 79 dc 49 dc e0 06 00 00 |T...F...|y.I.....|
|00000190| 13 00 00 00 00 00 00 00 | 50 6c 6f 74 54 72 61 6e |........|PlotTran|
|000001a0| 73 66 6f 72 6d 65 64 00 | 34 20 00 00 46 ff ff ff |sformed.|4 ..F...|
|000001b0| fc fc 43 dc 6c 09 00 00 | 13 00 00 00 00 00 00 00 |..C.l...|........|
|000001c0| 50 6c 6f 74 46 69 6c 65 | 54 72 61 6e 73 66 6f 72 |PlotFile|Transfor|
|000001d0| 6d 65 64 00 a0 29 00 00 | 46 ff ff ff e5 2f 4a dc |med..)..|F..../J.|
|000001e0| 38 02 00 00 13 00 00 00 | 00 00 00 00 50 44 72 69 |8.......|....PDri|
|000001f0| 76 65 72 49 6e 74 65 72 | 63 65 70 74 00 00 00 00 |verInter|cept....|
|00000200| 44 41 54 41 47 04 00 00 | 4a 50 45 47 5f 49 6e 66 |DATAG...|JPEG_Inf|
|00000210| 6f 20 20 28 26 34 39 39 | 38 30 29 0a 45 6e 74 72 |o (&499|80).Entr|
|00000220| 79 0a 20 09 52 30 20 3d | 20 66 6c 61 67 73 20 66 |y. .R0 =| flags f|
|00000230| 6f 72 20 64 65 73 69 72 | 65 64 20 6f 70 65 72 61 |or desir|ed opera|
|00000240| 74 69 6f 6e 3a 0a 20 09 | 20 09 62 69 74 20 30 20 |tion:. .| .bit 0 |
|00000250| 73 65 74 20 3d 3e 20 72 | 65 74 75 72 6e 20 64 69 |set => r|eturn di|
|00000260| 6d 65 6e 73 69 6f 6e 73 | 2c 20 63 6c 65 61 72 20 |mensions|, clear |
|00000270| 3d 3e 20 64 6f 6e 27 74 | 20 72 65 74 75 72 6e 20 |=> don't| return |
|00000280| 64 69 6d 65 6e 73 69 6f | 6e 73 0a 20 09 20 09 61 |dimensio|ns. . .a|
|00000290| 6c 6c 20 6f 74 68 65 72 | 20 62 69 74 73 20 72 65 |ll other| bits re|
|000002a0| 73 65 72 76 65 64 20 28 | 6d 75 73 74 20 62 65 20 |served (|must be |
|000002b0| 7a 65 72 6f 29 0a 20 09 | 52 31 20 3d 20 70 6f 69 |zero). .|R1 = poi|
|000002c0| 6e 74 65 72 20 74 6f 20 | 62 75 66 66 65 72 20 68 |nter to |buffer h|
|000002d0| 6f 6c 64 69 6e 67 20 4a | 50 45 47 20 69 6d 61 67 |olding J|PEG imag|
|000002e0| 65 0a 20 09 52 32 20 3d | 20 6c 65 6e 67 74 68 20 |e. .R2 =| length |
|000002f0| 6f 66 20 4a 50 45 47 20 | 69 6d 61 67 65 2c 20 69 |of JPEG |image, i|
|00000300| 6e 20 62 79 74 65 73 0a | 45 78 69 74 0a 20 09 52 |n bytes.|Exit. .R|
|00000310| 30 20 3d 20 72 65 74 75 | 72 6e 65 64 20 69 6e 66 |0 = retu|rned inf|
|00000320| 6f 72 6d 61 74 69 6f 6e | 20 66 6c 61 67 73 3a 0a |ormation| flags:.|
|00000330| 20 09 20 09 62 69 74 20 | 30 20 73 65 74 20 3d 3e | . .bit |0 set =>|
|00000340| 20 67 72 65 79 73 63 61 | 6c 65 20 69 6d 61 67 65 | greysca|le image|
|00000350| 2c 20 63 6c 65 61 72 20 | 3d 3e 20 63 6f 6c 6f 75 |, clear |=> colou|
|00000360| 72 20 69 6d 61 67 65 0a | 20 09 20 09 62 69 74 20 |r image.| . .bit |
|00000370| 31 20 73 65 74 20 3d 3e | 20 74 72 61 6e 73 66 6f |1 set =>| transfo|
|00000380| 72 6d 65 64 20 70 6c 6f | 74 73 20 6e 6f 74 20 73 |rmed plo|ts not s|
|00000390| 75 70 70 6f 72 74 65 64 | 2c 20 63 6c 65 61 72 20 |upported|, clear |
|000003a0| 3d 3e 20 73 75 70 70 6f | 72 74 65 64 0a 20 09 20 |=> suppo|rted. . |
|000003b0| 09 62 69 74 20 32 20 73 | 65 74 20 3d 3e 20 70 69 |.bit 2 s|et => pi|
|000003c0| 78 65 6c 20 64 65 6e 73 | 69 74 79 20 69 73 20 61 |xel dens|ity is a|
|000003d0| 20 73 69 6d 70 6c 65 20 | 72 61 74 69 6f 2c 20 63 | simple |ratio, c|
|000003e0| 6c 65 61 72 20 3d 3e 20 | 70 69 78 65 6c 20 64 65 |lear => |pixel de|
|000003f0| 6e 73 69 74 79 20 69 73 | 20 69 6e 20 64 70 69 0a |nsity is| in dpi.|
|00000400| 20 09 52 31 20 70 72 65 | 73 65 72 76 65 64 0a 20 | .R1 pre|served. |
|00000410| 09 52 32 20 3d 20 77 69 | 64 74 68 2c 20 69 6e 20 |.R2 = wi|dth, in |
|00000420| 70 69 78 65 6c 73 20 28 | 69 66 20 52 30 20 62 69 |pixels (|if R0 bi|
|00000430| 74 20 30 20 73 65 74 20 | 6f 6e 20 65 6e 74 72 79 |t 0 set |on entry|
|00000440| 29 0a 20 09 52 33 20 3d | 20 68 65 69 67 68 74 2c |). .R3 =| height,|
|00000450| 20 69 6e 20 70 69 78 65 | 6c 73 20 28 69 66 20 52 | in pixe|ls (if R|
|00000460| 30 20 62 69 74 20 30 20 | 73 65 74 20 6f 6e 20 65 |0 bit 0 |set on e|
|00000470| 6e 74 72 79 29 0a 20 09 | 52 34 20 3d 20 78 20 70 |ntry). .|R4 = x p|
|00000480| 69 78 65 6c 20 64 65 6e | 73 69 74 79 0a 20 09 52 |ixel den|sity. .R|
|00000490| 35 20 3d 20 79 20 70 69 | 78 65 6c 20 64 65 6e 73 |5 = y pi|xel dens|
|000004a0| 69 74 79 0a 20 09 52 36 | 20 3d 20 53 70 72 69 74 |ity. .R6| = Sprit|
|000004b0| 65 45 78 74 65 6e 64 27 | 73 20 61 64 64 69 74 69 |eExtend'|s additi|
|000004c0| 6f 6e 61 6c 20 65 78 74 | 72 61 20 77 6f 72 6b 73 |onal ext|ra works|
|000004d0| 70 61 63 65 20 72 65 71 | 75 69 72 65 6d 65 6e 74 |pace req|uirement|
|000004e0| 73 20 74 6f 20 70 6c 6f | 74 20 4a 50 45 47 20 28 |s to plo|t JPEG (|
|000004f0| 30 20 3d 3e 20 6e 6f 20 | 61 64 64 69 74 69 6f 6e |0 => no |addition|
|00000500| 61 6c 20 65 78 74 72 61 | 20 77 6f 72 6b 73 70 61 |al extra| workspa|
|00000510| 63 65 20 72 65 71 75 69 | 72 65 64 29 0a 0a 54 68 |ce requi|red)..Th|
|00000520| 69 73 20 63 61 6c 6c 20 | 67 69 76 65 73 20 69 6e |is call |gives in|
|00000530| 66 6f 72 6d 61 74 69 6f | 6e 20 6f 6e 20 61 20 4a |formatio|n on a J|
|00000540| 50 45 47 20 69 6d 61 67 | 65 20 68 65 6c 64 20 69 |PEG imag|e held i|
|00000550| 6e 20 61 20 62 75 66 66 | 65 72 20 69 6e 20 6d 65 |n a buff|er in me|
|00000560| 6d 6f 72 79 2e 0a 0a 49 | 74 20 63 68 65 63 6b 73 |mory...I|t checks|
|00000570| 20 74 68 65 20 68 65 61 | 64 65 72 20 65 6e 6f 75 | the hea|der enou|
|00000580| 67 68 20 74 6f 20 72 65 | 74 75 72 6e 20 74 68 65 |gh to re|turn the|
|00000590| 20 77 69 64 74 68 20 61 | 6e 64 20 68 65 69 67 68 | width a|nd heigh|
|000005a0| 74 2c 20 61 6e 64 20 64 | 6f 65 73 20 61 20 70 61 |t, and d|oes a pa|
|000005b0| 72 74 69 61 6c 20 76 61 | 6c 69 64 61 74 69 6f 6e |rtial va|lidation|
|000005c0| 20 6f 66 20 74 68 65 20 | 64 61 74 61 2e 20 20 49 | of the |data. I|
|000005d0| 74 20 72 65 74 75 72 6e | 73 20 61 6e 20 65 72 72 |t return|s an err|
|000005e0| 6f 72 20 69 66 20 74 68 | 65 20 69 6d 61 67 65 20 |or if th|e image |
|000005f0| 61 70 70 65 61 72 73 20 | 74 6f 20 62 65 20 69 6e |appears |to be in|
|00000600| 76 61 6c 69 64 3b 20 69 | 66 20 6e 6f 20 65 72 72 |valid; i|f no err|
|00000610| 6f 72 20 69 73 20 72 65 | 74 75 72 6e 65 64 20 79 |or is re|turned y|
|00000620| 6f 75 20 6d 61 79 20 61 | 73 73 75 6d 65 20 74 68 |ou may a|ssume th|
|00000630| 65 20 64 61 74 61 20 69 | 73 20 61 20 4a 50 45 47 |e data i|s a JPEG|
|00000640| 20 69 6d 61 67 65 2e 00 | 44 41 54 41 41 04 00 00 | image..|DATAA...|
|00000650| 4a 50 45 47 5f 46 69 6c | 65 49 6e 66 6f 20 20 28 |JPEG_Fil|eInfo (|
|00000660| 26 34 39 39 38 31 29 0a | 45 6e 74 72 79 0a 20 09 |&49981).|Entry. .|
|00000670| 52 30 20 3d 20 66 6c 61 | 67 73 20 66 6f 72 20 64 |R0 = fla|gs for d|
|00000680| 65 73 69 72 65 64 20 6f | 70 65 72 61 74 69 6f 6e |esired o|peration|
|00000690| 3a 0a 20 09 20 09 62 69 | 74 20 30 20 73 65 74 20 |:. . .bi|t 0 set |
|000006a0| 3d 3e 20 72 65 74 75 72 | 6e 20 64 69 6d 65 6e 73 |=> retur|n dimens|
|000006b0| 69 6f 6e 73 2c 20 63 6c | 65 61 72 20 3d 3e 20 64 |ions, cl|ear => d|
|000006c0| 6f 6e 27 74 20 72 65 74 | 75 72 6e 20 64 69 6d 65 |on't ret|urn dime|
|000006d0| 6e 73 69 6f 6e 73 0a 20 | 09 20 09 61 6c 6c 20 6f |nsions. |. .all o|
|000006e0| 74 68 65 72 20 62 69 74 | 73 20 72 65 73 65 72 76 |ther bit|s reserv|
|000006f0| 65 64 20 28 6d 75 73 74 | 20 62 65 20 7a 65 72 6f |ed (must| be zero|
|00000700| 29 0a 20 09 52 31 20 3d | 20 70 6f 69 6e 74 65 72 |). .R1 =| pointer|
|00000710| 20 74 6f 20 70 61 74 68 | 6e 61 6d 65 20 6f 66 20 | to path|name of |
|00000720| 4a 50 45 47 20 66 69 6c | 65 2c 20 63 6f 6e 74 72 |JPEG fil|e, contr|
|00000730| 6f 6c 20 63 68 61 72 61 | 63 74 65 72 20 74 65 72 |ol chara|cter ter|
|00000740| 6d 69 6e 61 74 65 64 0a | 0a 45 78 69 74 0a 20 09 |minated.|.Exit. .|
|00000750| 52 30 20 3d 20 72 65 74 | 75 72 6e 65 64 20 69 6e |R0 = ret|urned in|
|00000760| 66 6f 72 6d 61 74 69 6f | 6e 20 66 6c 61 67 73 3a |formatio|n flags:|
|00000770| 0a 20 09 20 09 62 69 74 | 20 30 20 73 65 74 20 3d |. . .bit| 0 set =|
|00000780| 3e 20 67 72 65 79 73 63 | 61 6c 65 20 69 6d 61 67 |> greysc|ale imag|
|00000790| 65 2c 20 63 6c 65 61 72 | 20 3d 3e 20 63 6f 6c 6f |e, clear| => colo|
|000007a0| 75 72 20 69 6d 61 67 65 | 0a 20 09 20 09 62 69 74 |ur image|. . .bit|
|000007b0| 20 31 20 73 65 74 20 3d | 3e 20 74 72 61 6e 73 66 | 1 set =|> transf|
|000007c0| 6f 72 6d 65 64 20 70 6c | 6f 74 73 20 6e 6f 74 20 |ormed pl|ots not |
|000007d0| 73 75 70 70 6f 72 74 65 | 64 2c 20 63 6c 65 61 72 |supporte|d, clear|
|000007e0| 20 3d 3e 20 73 75 70 70 | 6f 72 74 65 64 0a 20 09 | => supp|orted. .|
|000007f0| 20 09 62 69 74 20 32 20 | 73 65 74 20 3d 3e 20 70 | .bit 2 |set => p|
|00000800| 69 78 65 6c 20 64 65 6e | 73 69 74 79 20 69 73 20 |ixel den|sity is |
|00000810| 61 20 73 69 6d 70 6c 65 | 20 72 61 74 69 6f 2c 20 |a simple| ratio, |
|00000820| 63 6c 65 61 72 20 3d 3e | 20 70 69 78 65 6c 20 64 |clear =>| pixel d|
|00000830| 65 6e 73 69 74 79 20 69 | 73 20 69 6e 20 64 70 69 |ensity i|s in dpi|
|00000840| 0a 20 09 52 31 20 70 72 | 65 73 65 72 76 65 64 0a |. .R1 pr|eserved.|
|00000850| 20 09 52 32 20 3d 20 77 | 69 64 74 68 2c 20 69 6e | .R2 = w|idth, in|
|00000860| 20 70 69 78 65 6c 73 0a | 20 09 52 33 20 3d 20 68 | pixels.| .R3 = h|
|00000870| 65 69 67 68 74 2c 20 69 | 6e 20 70 69 78 65 6c 73 |eight, i|n pixels|
|00000880| 0a 20 09 52 34 20 3d 20 | 78 20 70 69 78 65 6c 20 |. .R4 = |x pixel |
|00000890| 64 65 6e 73 69 74 79 0a | 20 09 52 35 20 3d 20 79 |density.| .R5 = y|
|000008a0| 20 70 69 78 65 6c 20 64 | 65 6e 73 69 74 79 0a 20 | pixel d|ensity. |
|000008b0| 09 52 36 20 3d 20 53 70 | 72 69 74 65 45 78 74 65 |.R6 = Sp|riteExte|
|000008c0| 6e 64 27 73 20 61 64 64 | 69 74 69 6f 6e 61 6c 20 |nd's add|itional |
|000008d0| 65 78 74 72 61 20 77 6f | 72 6b 73 70 61 63 65 20 |extra wo|rkspace |
|000008e0| 72 65 71 75 69 72 65 6d | 65 6e 74 73 20 74 6f 20 |requirem|ents to |
|000008f0| 70 6c 6f 74 20 4a 50 45 | 47 20 28 30 20 3d 3e 20 |plot JPE|G (0 => |
|00000900| 6e 6f 20 61 64 64 69 74 | 69 6f 6e 61 6c 20 65 78 |no addit|ional ex|
|00000910| 74 72 61 20 77 6f 72 6b | 73 70 61 63 65 20 72 65 |tra work|space re|
|00000920| 71 75 69 72 65 64 29 0a | 0a 54 68 69 73 20 63 61 |quired).|.This ca|
|00000930| 6c 6c 20 67 69 76 65 73 | 20 69 6e 66 6f 72 6d 61 |ll gives| informa|
|00000940| 74 69 6f 6e 20 6f 6e 20 | 61 20 4a 50 45 47 20 69 |tion on |a JPEG i|
|00000950| 6d 61 67 65 20 68 65 6c | 64 20 69 6e 20 61 20 66 |mage hel|d in a f|
|00000960| 69 6c 65 2e 0a 0a 54 68 | 69 73 20 63 61 6c 6c 20 |ile...Th|is call |
|00000970| 63 68 65 63 6b 73 20 74 | 68 65 20 68 65 61 64 65 |checks t|he heade|
|00000980| 72 20 65 6e 6f 75 67 68 | 20 74 6f 20 72 65 74 75 |r enough| to retu|
|00000990| 72 6e 20 74 68 65 20 77 | 69 64 74 68 20 61 6e 64 |rn the w|idth and|
|000009a0| 20 68 65 69 67 68 74 2c | 20 61 6e 64 20 64 6f 65 | height,| and doe|
|000009b0| 73 20 61 20 70 61 72 74 | 69 61 6c 20 76 61 6c 69 |s a part|ial vali|
|000009c0| 64 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 64 61 |dation o|f the da|
|000009d0| 74 61 2e 20 20 49 74 20 | 72 65 74 75 72 6e 73 20 |ta. It |returns |
|000009e0| 61 6e 20 65 72 72 6f 72 | 20 69 66 20 74 68 65 20 |an error| if the |
|000009f0| 69 6d 61 67 65 20 61 70 | 70 65 61 72 73 20 74 6f |image ap|pears to|
|00000a00| 20 62 65 20 69 6e 76 61 | 6c 69 64 3b 20 69 66 20 | be inva|lid; if |
|00000a10| 6e 6f 20 65 72 72 6f 72 | 20 69 73 20 72 65 74 75 |no error| is retu|
|00000a20| 72 6e 65 64 20 79 6f 75 | 20 6d 61 79 20 61 73 73 |rned you| may ass|
|00000a30| 75 6d 65 20 74 68 61 74 | 20 74 68 65 20 64 61 74 |ume that| the dat|
|00000a40| 61 20 69 73 20 61 20 4a | 50 45 47 20 69 6d 61 67 |a is a J|PEG imag|
|00000a50| 65 2e 0a 0a 54 68 69 73 | 20 63 61 6c 6c 20 69 73 |e...This| call is|
|00000a60| 20 6f 6e 6c 79 20 61 76 | 61 69 6c 61 62 6c 65 20 | only av|ailable |
|00000a70| 66 72 6f 6d 20 52 49 53 | 43 20 4f 53 20 33 2e 36 |from RIS|C OS 3.6|
|00000a80| 20 6f 6e 77 61 72 64 73 | 2e 00 00 00 44 41 54 41 | onwards|....DATA|
|00000a90| 56 06 00 00 4a 50 45 47 | 5f 50 6c 6f 74 53 63 61 |V...JPEG|_PlotSca|
|00000aa0| 6c 65 64 20 20 28 26 34 | 39 39 38 32 29 0a 45 6e |led (&4|9982).En|
|00000ab0| 74 72 79 0a 20 09 52 30 | 20 3d 20 70 6f 69 6e 74 |try. .R0| = point|
|00000ac0| 65 72 20 74 6f 20 62 75 | 66 66 65 72 20 68 6f 6c |er to bu|ffer hol|
|00000ad0| 64 69 6e 67 20 4a 50 45 | 47 20 69 6d 61 67 65 0a |ding JPE|G image.|
|00000ae0| 20 09 52 31 20 3d 20 78 | 20 63 6f 6f 72 64 69 6e | .R1 = x| coordin|
|00000af0| 61 74 65 20 61 74 20 77 | 68 69 63 68 20 74 6f 20 |ate at w|hich to |
|00000b00| 70 6c 6f 74 0a 20 09 52 | 32 20 3d 20 79 20 63 6f |plot. .R|2 = y co|
|00000b10| 6f 72 64 69 6e 61 74 65 | 20 61 74 20 77 68 69 63 |ordinate| at whic|
|00000b20| 68 20 74 6f 20 70 6c 6f | 74 0a 20 09 52 33 20 3d |h to plo|t. .R3 =|
|00000b30| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 73 63 61 6c | pointer| to scal|
|00000b40| 65 20 66 61 63 74 6f 72 | 73 3a 20 30 20 3d 3e 20 |e factor|s: 0 => |
|00000b50| 6e 6f 20 73 63 61 6c 69 | 6e 67 0a 20 09 52 34 20 |no scali|ng. .R4 |
|00000b60| 3d 20 6c 65 6e 67 74 68 | 20 6f 66 20 4a 50 45 47 |= length| of JPEG|
|00000b70| 20 69 6d 61 67 65 2c 20 | 69 6e 20 62 79 74 65 73 | image, |in bytes|
|00000b80| 0a 20 09 52 35 20 3d 20 | 66 6c 61 67 73 3a 0a 20 |. .R5 = |flags:. |
|00000b90| 09 20 09 62 69 74 20 30 | 20 73 65 74 20 3d 3e 20 |. .bit 0| set => |
|00000ba0| 64 69 74 68 65 72 20 6f | 75 74 70 75 74 20 77 68 |dither o|utput wh|
|00000bb0| 65 6e 20 70 6c 6f 74 74 | 69 6e 67 20 32 34 20 62 |en plott|ing 24 b|
|00000bc0| 69 74 20 4a 50 45 47 20 | 61 74 20 31 36 62 70 70 |it JPEG |at 16bpp|
|00000bd0| 20 6f 72 20 62 65 6c 6f | 77 0a 20 09 20 09 62 69 | or belo|w. . .bi|
|00000be0| 74 20 31 20 73 65 74 20 | 3d 3e 20 64 69 74 68 65 |t 1 set |=> dithe|
|00000bf0| 72 69 6e 67 20 28 69 66 | 20 61 6e 79 29 20 69 73 |ring (if| any) is|
|00000c00| 20 66 75 6c 6c 20 65 72 | 72 6f 72 20 64 69 66 66 | full er|ror diff|
|00000c10| 75 73 65 64 20 77 68 65 | 6e 20 70 6c 6f 74 74 69 |used whe|n plotti|
|00000c20| 6e 67 20 61 74 20 38 62 | 70 70 0a 20 09 20 09 61 |ng at 8b|pp. . .a|
|00000c30| 6c 6c 20 6f 74 68 65 72 | 20 62 69 74 73 20 72 65 |ll other| bits re|
|00000c40| 73 65 72 76 65 64 20 28 | 6d 75 73 74 20 62 65 20 |served (|must be |
|00000c50| 7a 65 72 6f 29 0a 45 78 | 69 74 0a 09 52 30 20 2d |zero).Ex|it..R0 -|
|00000c60| 20 52 35 20 70 72 65 73 | 65 72 76 65 64 0a 0a 54 | R5 pres|erved..T|
|00000c70| 68 69 73 20 53 57 49 20 | 64 65 63 6f 6d 70 72 65 |his SWI |decompre|
|00000c80| 73 73 65 73 2c 20 73 63 | 61 6c 65 73 2c 20 61 6e |sses, sc|ales, an|
|00000c90| 64 20 70 6c 6f 74 73 20 | 6f 6e 20 74 68 65 20 73 |d plots |on the s|
|00000ca0| 63 72 65 65 6e 20 61 20 | 4a 50 45 47 20 69 6d 61 |creen a |JPEG ima|
|00000cb0| 67 65 20 68 65 6c 64 20 | 69 6e 20 61 20 62 75 66 |ge held |in a buf|
|00000cc0| 66 65 72 20 69 6e 20 6d | 65 6d 6f 72 79 2e 0a 0a |fer in m|emory...|
|00000cd0| 54 68 65 20 66 75 6e 63 | 74 69 6f 6e 61 6c 69 74 |The func|tionalit|
|00000ce0| 79 20 6f 66 20 74 68 69 | 73 20 63 61 6c 6c 20 66 |y of thi|s call f|
|00000cf0| 6f 72 20 4a 50 45 47 73 | 20 69 73 20 73 69 6d 69 |or JPEGs| is simi|
|00000d00| 6c 61 72 20 74 6f 20 74 | 68 61 74 20 6f 66 20 3c |lar to t|hat of <|
|00000d10| 4f 53 5f 53 70 72 69 74 | 65 4f 70 3d 3e 53 57 49 |OS_Sprit|eOp=>SWI|
|00000d20| 3a 4f 53 5f 53 70 72 69 | 74 65 4f 70 3e 20 35 32 |:OS_Spri|teOp> 52|
|00000d30| 20 28 50 75 74 20 73 70 | 72 69 74 65 20 73 63 61 | (Put sp|rite sca|
|00000d40| 6c 65 64 29 20 66 6f 72 | 20 73 70 72 69 74 65 73 |led) for| sprites|
|00000d50| 2e 20 20 54 68 65 20 73 | 63 61 6c 65 20 66 61 63 |. The s|cale fac|
|00000d60| 74 6f 72 73 20 61 6e 64 | 20 74 68 65 20 63 6f 6f |tors and| the coo|
|00000d70| 72 64 69 6e 61 74 65 73 | 20 68 61 76 65 20 65 78 |rdinates| have ex|
|00000d80| 61 63 74 6c 79 20 74 68 | 65 20 73 61 6d 65 20 6d |actly th|e same m|
|00000d90| 65 61 6e 69 6e 67 2c 20 | 61 6e 64 20 74 68 65 20 |eaning, |and the |
|00000da0| 73 63 61 6c 69 6e 67 20 | 61 6c 67 6f 72 69 74 68 |scaling |algorith|
|00000db0| 6d 73 20 75 73 65 64 20 | 61 72 65 20 74 68 65 20 |ms used |are the |
|00000dc0| 73 61 6d 65 20 69 6e 20 | 62 6f 74 68 20 63 61 6c |same in |both cal|
|00000dd0| 6c 73 2e 20 20 48 6f 77 | 65 76 65 72 2c 20 74 68 |ls. How|ever, th|
|00000de0| 69 73 20 63 61 6c 6c 20 | 6f 6e 6c 79 20 73 75 70 |is call |only sup|
|00000df0| 70 6f 72 74 73 20 61 20 | 64 69 72 65 63 74 20 70 |ports a |direct p|
|00000e00| 6c 6f 74 20 28 69 65 20 | 70 6c 6f 74 20 61 63 74 |lot (ie |plot act|
|00000e10| 69 6f 6e 20 30 20 6f 66 | 20 4f 53 5f 53 70 72 69 |ion 0 of| OS_Spri|
|00000e20| 74 65 4f 70 20 35 32 29 | 2e 0a 0a 49 6e 20 70 6c |teOp 52)|...In pl|
|00000e30| 6f 74 74 69 6e 67 20 74 | 68 65 20 4a 50 45 47 2c |otting t|he JPEG,|
|00000e40| 20 74 68 65 20 53 70 72 | 69 74 65 45 78 74 65 6e | the Spr|iteExten|
|00000e50| 64 20 6d 6f 64 75 6c 65 | 20 6d 61 79 20 63 6c 61 |d module| may cla|
|00000e60| 69 6d 20 65 78 74 72 61 | 20 77 6f 72 6b 73 70 61 |im extra| workspa|
|00000e70| 63 65 20 69 6e 20 61 20 | 64 79 6e 61 6d 69 63 20 |ce in a |dynamic |
|00000e80| 61 72 65 61 20 74 6f 20 | 73 74 6f 72 65 20 74 61 |area to |store ta|
|00000e90| 62 6c 65 73 20 65 74 63 | 2e 20 20 49 74 20 6b 65 |bles etc|. It ke|
|00000ea0| 65 70 73 20 74 68 65 73 | 65 20 63 61 63 68 65 64 |eps thes|e cached|
|00000eb0| 20 75 6e 74 69 6c 20 65 | 69 74 68 65 72 20 69 73 | until e|ither is|
|00000ec0| 20 69 73 20 61 73 6b 65 | 64 20 74 6f 20 70 6c 6f | is aske|d to plo|
|00000ed0| 74 20 61 20 64 69 66 66 | 65 72 65 6e 74 20 4a 50 |t a diff|erent JP|
|00000ee0| 45 47 2c 20 6f 72 20 74 | 68 65 20 75 73 65 72 20 |EG, or t|he user |
|00000ef0| 64 65 63 72 65 61 73 65 | 73 20 74 68 65 20 64 79 |decrease|s the dy|
|00000f00| 6e 61 6d 69 63 20 61 72 | 65 61 27 73 20 73 69 7a |namic ar|ea's siz|
|00000f10| 65 2e 20 20 54 68 69 73 | 20 73 70 65 65 64 73 20 |e. This| speeds |
|00000f20| 75 70 20 73 75 63 63 65 | 73 73 69 76 65 20 72 65 |up succe|ssive re|
|00000f30| 70 6c 6f 74 73 20 6f 66 | 20 74 68 65 20 73 61 6d |plots of| the sam|
|00000f40| 65 20 4a 50 45 47 2e 20 | 20 59 6f 75 20 63 61 6e |e JPEG. | You can|
|00000f50| 20 66 69 6e 64 20 6f 75 | 74 20 68 6f 77 20 6d 75 | find ou|t how mu|
|00000f60| 63 68 20 65 78 74 72 61 | 20 77 6f 72 6b 73 70 61 |ch extra| workspa|
|00000f70| 63 65 20 53 70 72 69 74 | 65 45 78 74 65 6e 64 20 |ce Sprit|eExtend |
|00000f80| 77 69 6c 6c 20 72 65 71 | 75 69 72 65 20 2d 20 69 |will req|uire - i|
|00000f90| 66 20 61 6e 79 20 2d 20 | 62 79 20 66 69 72 73 74 |f any - |by first|
|00000fa0| 20 63 61 6c 6c 69 6e 67 | 20 3c 4a 50 45 47 5f 49 | calling| <JPEG_I|
|00000fb0| 6e 66 6f 3e 20 6f 72 20 | 3c 4a 50 45 47 5f 46 69 |nfo> or |<JPEG_Fi|
|00000fc0| 6c 65 49 6e 66 6f 3e 2e | 20 20 59 6f 75 20 63 61 |leInfo>.| You ca|
|00000fd0| 6e 20 68 65 6e 63 65 20 | 65 6e 73 75 72 65 20 74 |n hence |ensure t|
|00000fe0| 68 65 72 65 20 69 73 20 | 73 75 66 66 69 63 69 65 |here is |sufficie|
|00000ff0| 6e 74 20 66 72 65 65 20 | 6d 65 6d 6f 72 79 20 62 |nt free |memory b|
|00001000| 65 66 6f 72 65 20 6d 61 | 6b 69 6e 67 20 74 68 69 |efore ma|king thi|
|00001010| 73 20 63 61 6c 6c 2e 0a | 0a 54 68 69 73 20 63 61 |s call..|.This ca|
|00001020| 6c 6c 20 72 65 74 75 72 | 6e 73 20 61 6e 20 65 72 |ll retur|ns an er|
|00001030| 72 6f 72 20 69 66 20 69 | 74 20 63 61 6e 6e 6f 74 |ror if i|t cannot|
|00001040| 20 63 6c 61 69 6d 20 73 | 75 66 66 69 63 69 65 6e | claim s|ufficien|
|00001050| 74 20 6d 65 6d 6f 72 79 | 20 74 6f 20 70 6c 6f 74 |t memory| to plot|
|00001060| 20 74 68 65 20 4a 50 45 | 47 20 69 6d 61 67 65 2c | the JPE|G image,|
|00001070| 20 6f 72 20 69 66 20 74 | 68 65 20 69 6d 61 67 65 | or if t|he image|
|00001080| 20 61 70 70 65 61 72 73 | 20 69 6e 63 6f 6d 70 6c | appears| incompl|
|00001090| 65 74 65 20 6f 72 20 63 | 6f 72 72 75 70 74 20 69 |ete or c|orrupt i|
|000010a0| 6e 20 73 6f 6d 65 20 77 | 61 79 2e 0a 0a 54 68 69 |n some w|ay...Thi|
|000010b0| 73 20 63 61 6c 6c 20 69 | 73 20 6f 6e 6c 79 20 61 |s call i|s only a|
|000010c0| 76 61 69 6c 61 62 6c 65 | 20 66 72 6f 6d 20 52 49 |vailable| from RI|
|000010d0| 53 43 20 4f 53 20 33 2e | 36 20 6f 6e 77 61 72 64 |SC OS 3.|6 onward|
|000010e0| 73 2e 00 00 44 41 54 41 | 6e 08 00 00 4a 50 45 47 |s...DATA|n...JPEG|
|000010f0| 5f 50 6c 6f 74 46 69 6c | 65 53 63 61 6c 65 64 20 |_PlotFil|eScaled |
|00001100| 20 28 26 34 39 39 38 33 | 29 0a 45 6e 74 72 79 0a | (&49983|).Entry.|
|00001110| 20 09 52 30 20 3d 20 70 | 6f 69 6e 74 65 72 20 74 | .R0 = p|ointer t|
|00001120| 6f 20 70 61 74 68 6e 61 | 6d 65 20 6f 66 20 4a 50 |o pathna|me of JP|
|00001130| 45 47 20 66 69 6c 65 2c | 20 63 6f 6e 74 72 6f 6c |EG file,| control|
|00001140| 20 63 68 61 72 61 63 74 | 65 72 20 74 65 72 6d 69 | charact|er termi|
|00001150| 6e 61 74 65 64 0a 20 09 | 52 31 20 3d 20 78 20 63 |nated. .|R1 = x c|
|00001160| 6f 6f 72 64 69 6e 61 74 | 65 20 61 74 20 77 68 69 |oordinat|e at whi|
|00001170| 63 68 20 74 6f 20 70 6c | 6f 74 0a 20 09 52 32 20 |ch to pl|ot. .R2 |
|00001180| 3d 20 79 20 63 6f 6f 72 | 64 69 6e 61 74 65 20 61 |= y coor|dinate a|
|00001190| 74 20 77 68 69 63 68 20 | 74 6f 20 70 6c 6f 74 0a |t which |to plot.|
|000011a0| 20 09 52 33 20 3d 20 70 | 6f 69 6e 74 65 72 20 74 | .R3 = p|ointer t|
|000011b0| 6f 20 73 63 61 6c 65 20 | 66 61 63 74 6f 72 73 20 |o scale |factors |
|000011c0| 3a 20 30 20 3d 3e 20 6e | 6f 20 73 63 61 6c 69 6e |: 0 => n|o scalin|
|000011d0| 67 0a 20 09 52 34 20 3d | 20 66 6c 61 67 73 3a 0a |g. .R4 =| flags:.|
|000011e0| 20 09 20 09 62 69 74 20 | 30 20 73 65 74 20 3d 3e | . .bit |0 set =>|
|000011f0| 20 64 69 74 68 65 72 20 | 6f 75 74 70 75 74 20 77 | dither |output w|
|00001200| 68 65 6e 20 70 6c 6f 74 | 74 69 6e 67 20 32 34 20 |hen plot|ting 24 |
|00001210| 62 69 74 20 4a 50 45 47 | 20 61 74 20 31 36 62 70 |bit JPEG| at 16bp|
|00001220| 70 20 6f 72 20 62 65 6c | 6f 77 0a 20 09 20 09 62 |p or bel|ow. . .b|
|00001230| 69 74 20 31 20 73 65 74 | 20 3d 3e 20 64 69 74 68 |it 1 set| => dith|
|00001240| 65 72 69 6e 67 20 28 69 | 66 20 61 6e 79 29 20 69 |ering (i|f any) i|
|00001250| 73 20 66 75 6c 6c 20 65 | 72 72 6f 72 20 64 69 66 |s full e|rror dif|
|00001260| 66 75 73 65 64 20 77 68 | 65 6e 70 6c 6f 74 74 69 |fused wh|enplotti|
|00001270| 6e 67 20 61 74 20 38 62 | 70 70 0a 20 09 20 09 61 |ng at 8b|pp. . .a|
|00001280| 6c 6c 20 6f 74 68 65 72 | 20 62 69 74 73 20 72 65 |ll other| bits re|
|00001290| 73 65 72 76 65 64 20 28 | 6d 75 73 74 20 62 65 20 |served (|must be |
|000012a0| 7a 65 72 6f 29 0a 45 78 | 69 74 0a 20 09 52 30 20 |zero).Ex|it. .R0 |
|000012b0| 2d 20 52 34 20 70 72 65 | 73 65 72 76 65 64 0a 0a |- R4 pre|served..|
|000012c0| 54 68 69 73 20 53 57 49 | 20 64 65 63 6f 6d 70 72 |This SWI| decompr|
|000012d0| 65 73 73 65 73 2c 20 73 | 63 61 6c 65 73 2c 20 61 |esses, s|cales, a|
|000012e0| 6e 64 20 70 6c 6f 74 73 | 20 6f 6e 20 74 68 65 20 |nd plots| on the |
|000012f0| 73 63 72 65 65 6e 20 61 | 20 4a 50 45 47 20 69 6d |screen a| JPEG im|
|00001300| 61 67 65 20 68 65 6c 64 | 20 69 6e 20 61 20 66 69 |age held| in a fi|
|00001310| 6c 65 2e 0a 0a 54 68 65 | 20 66 75 6e 63 74 69 6f |le...The| functio|
|00001320| 6e 61 6c 69 74 79 20 6f | 66 20 74 68 69 73 20 63 |nality o|f this c|
|00001330| 61 6c 6c 20 66 6f 72 20 | 4a 50 45 47 73 20 69 73 |all for |JPEGs is|
|00001340| 20 73 69 6d 69 6c 61 72 | 20 74 6f 20 74 68 61 74 | similar| to that|
|00001350| 20 6f 66 20 3c 4f 53 5f | 53 70 72 69 74 65 4f 70 | of <OS_|SpriteOp|
|00001360| 3d 3e 53 57 49 3a 4f 53 | 5f 53 70 72 69 74 65 4f |=>SWI:OS|_SpriteO|
|00001370| 70 3e 20 35 32 20 28 50 | 75 74 20 73 70 72 69 74 |p> 52 (P|ut sprit|
|00001380| 65 20 73 63 61 6c 65 64 | 29 20 66 6f 72 20 73 70 |e scaled|) for sp|
|00001390| 72 69 74 65 73 2e 20 20 | 54 68 65 20 73 63 61 6c |rites. |The scal|
|000013a0| 65 20 66 61 63 74 6f 72 | 73 20 61 6e 64 20 74 68 |e factor|s and th|
|000013b0| 65 20 63 6f 6f 72 64 69 | 6e 61 74 65 73 20 68 61 |e coordi|nates ha|
|000013c0| 76 65 20 65 78 61 63 74 | 6c 79 20 74 68 65 20 73 |ve exact|ly the s|
|000013d0| 61 6d 65 20 6d 65 61 6e | 69 6e 67 2c 20 61 6e 64 |ame mean|ing, and|
|000013e0| 20 74 68 65 20 73 63 61 | 6c 69 6e 67 20 61 6c 67 | the sca|ling alg|
|000013f0| 6f 72 69 74 68 6d 73 20 | 75 73 65 64 20 61 72 65 |orithms |used are|
|00001400| 20 74 68 65 20 73 61 6d | 65 20 69 6e 20 62 6f 74 | the sam|e in bot|
|00001410| 68 20 63 61 6c 6c 73 2e | 20 20 48 6f 77 65 76 65 |h calls.| Howeve|
|00001420| 72 2c 20 74 68 69 73 20 | 63 61 6c 6c 20 6f 6e 6c |r, this |call onl|
|00001430| 79 20 73 75 70 70 6f 72 | 74 73 20 61 20 64 69 72 |y suppor|ts a dir|
|00001440| 65 63 74 20 70 6c 6f 74 | 20 28 69 65 20 70 6c 6f |ect plot| (ie plo|
|00001450| 74 20 61 63 74 69 6f 6e | 20 30 20 6f 66 20 4f 53 |t action| 0 of OS|
|00001460| 5f 53 70 72 69 74 65 4f | 70 20 35 32 29 2e 0a 0a |_SpriteO|p 52)...|
|00001470| 54 68 65 20 66 69 6c 65 | 20 69 73 20 6c 6f 61 64 |The file| is load|
|00001480| 65 64 20 69 6e 74 6f 20 | 6d 65 6d 6f 72 79 20 66 |ed into |memory f|
|00001490| 6f 72 20 74 68 65 20 64 | 75 72 61 74 69 6f 6e 20 |or the d|uration |
|000014a0| 6f 66 20 74 68 65 20 63 | 61 6c 6c 2c 20 62 75 74 |of the c|all, but|
|000014b0| 20 69 73 20 6e 6f 74 20 | 63 61 63 68 65 64 2e 20 | is not |cached. |
|000014c0| 20 54 68 69 73 20 63 61 | 6c 6c 20 74 68 65 72 65 | This ca|ll there|
|000014d0| 66 6f 72 65 20 75 73 65 | 73 20 61 73 20 6d 75 63 |fore use|s as muc|
|000014e0| 68 20 6d 65 6d 6f 72 79 | 20 61 73 20 6c 6f 61 64 |h memory| as load|
|000014f0| 69 6e 67 20 74 68 65 20 | 66 69 6c 65 20 69 6e 74 |ing the |file int|
|00001500| 6f 20 61 20 62 75 66 66 | 65 72 20 79 6f 75 72 73 |o a buff|er yours|
|00001510| 65 6c 66 20 61 6e 64 20 | 74 68 65 20 63 61 6c 6c |elf and |the call|
|00001520| 69 6e 67 20 3c 4a 50 45 | 47 5f 50 6c 6f 74 53 63 |ing <JPE|G_PlotSc|
|00001530| 61 6c 65 64 3e 2c 20 61 | 6e 64 20 67 69 76 65 73 |aled>, a|nd gives|
|00001540| 20 79 6f 75 20 6e 6f 20 | 63 6f 6e 74 72 6f 6c 20 | you no |control |
|00001550| 6f 76 65 72 20 77 68 65 | 74 68 65 72 20 74 68 65 |over whe|ther the|
|00001560| 20 69 6d 61 67 65 20 72 | 65 6d 61 69 6e 73 20 63 | image r|emains c|
|00001570| 61 63 68 65 64 2e 20 20 | 46 75 74 68 65 72 6d 6f |ached. |Futhermo|
|00001580| 72 65 2c 20 61 6c 74 68 | 6f 75 67 68 20 74 68 65 |re, alth|ough the|
|00001590| 20 6d 65 63 68 61 6e 69 | 73 6d 20 65 78 69 73 74 | mechani|sm exist|
|000015a0| 73 20 74 6f 20 70 61 73 | 73 20 74 68 69 73 20 63 |s to pas|s this c|
|000015b0| 61 6c 6c 20 6f 6e 20 74 | 6f 20 74 68 65 20 70 72 |all on t|o the pr|
|000015c0| 69 6e 74 65 72 20 64 72 | 69 76 65 72 73 2c 20 74 |inter dr|ivers, t|
|000015d0| 68 65 79 20 64 6f 20 6e | 6f 74 20 73 75 70 70 6f |hey do n|ot suppo|
|000015e0| 72 74 20 69 74 2e 20 20 | 57 65 20 74 68 65 72 65 |rt it. |We there|
|000015f0| 66 6f 72 65 20 73 74 72 | 6f 6e 67 6c 79 20 72 65 |fore str|ongly re|
|00001600| 63 6f 6d 6d 65 6e 64 20 | 74 68 61 74 20 79 6f 75 |commend |that you|
|00001610| 20 75 73 65 20 4a 50 45 | 47 5f 50 6c 6f 74 53 63 | use JPE|G_PlotSc|
|00001620| 61 6c 65 64 20 69 6e 20 | 70 72 65 66 65 72 65 6e |aled in |preferen|
|00001630| 63 65 20 74 6f 20 74 68 | 69 73 20 63 61 6c 6c 2e |ce to th|is call.|
|00001640| 0a 0a 41 73 20 77 65 6c | 6c 20 61 73 20 74 68 65 |..As wel|l as the|
|00001650| 20 6d 65 6d 6f 72 79 20 | 74 6f 20 68 6f 6c 64 20 | memory |to hold |
|00001660| 74 68 65 20 66 69 6c 65 | 2c 20 74 68 65 20 53 70 |the file|, the Sp|
|00001670| 72 69 74 65 45 78 74 65 | 6e 64 20 6d 6f 64 75 6c |riteExte|nd modul|
|00001680| 65 20 6d 61 79 20 63 6c | 61 69 6d 20 65 78 74 72 |e may cl|aim extr|
|00001690| 61 20 77 6f 72 6b 73 70 | 61 63 65 20 69 6e 20 61 |a worksp|ace in a|
|000016a0| 20 64 79 6e 61 6d 69 63 | 20 61 72 65 61 20 74 6f | dynamic| area to|
|000016b0| 20 73 74 6f 72 65 20 74 | 61 62 6c 65 73 20 65 74 | store t|ables et|
|000016c0| 63 2e 20 20 49 74 20 6b | 65 65 70 73 20 74 68 65 |c. It k|eeps the|
|000016d0| 73 65 20 63 61 63 68 65 | 64 20 75 6e 74 69 6c 20 |se cache|d until |
|000016e0| 65 69 74 68 65 72 20 69 | 74 20 69 73 20 61 73 6b |either i|t is ask|
|000016f0| 65 64 20 74 6f 20 70 6c | 6f 74 20 61 20 64 69 66 |ed to pl|ot a dif|
|00001700| 66 65 72 65 6e 74 20 4a | 50 45 47 2c 20 6f 72 20 |ferent J|PEG, or |
|00001710| 74 68 65 20 75 73 65 72 | 20 64 65 63 72 65 61 73 |the user| decreas|
|00001720| 65 73 20 74 68 65 20 64 | 79 6e 61 6d 69 63 20 61 |es the d|ynamic a|
|00001730| 72 65 61 27 73 20 73 69 | 7a 65 2e 20 20 54 68 69 |rea's si|ze. Thi|
|00001740| 73 20 73 70 65 65 64 73 | 20 75 70 20 73 75 63 63 |s speeds| up succ|
|00001750| 65 73 73 69 76 65 20 72 | 65 70 6c 6f 74 73 20 6f |essive r|eplots o|
|00001760| 66 20 74 68 65 20 73 61 | 6d 65 20 4a 50 45 47 2e |f the sa|me JPEG.|
|00001770| 20 20 59 6f 75 20 63 61 | 6e 20 66 69 6e 64 20 68 | You ca|n find h|
|00001780| 6f 77 20 6d 75 63 68 20 | 65 78 74 72 61 20 77 6f |ow much |extra wo|
|00001790| 72 6b 73 70 61 63 65 20 | 53 70 72 69 74 65 45 78 |rkspace |SpriteEx|
|000017a0| 74 65 6e 64 20 77 69 6c | 6c 20 72 65 71 75 69 72 |tend wil|l requir|
|000017b0| 65 20 2d 20 69 66 20 61 | 6e 79 20 2d 20 62 79 20 |e - if a|ny - by |
|000017c0| 66 69 72 73 74 20 63 61 | 6c 6c 69 6e 67 20 3c 4a |first ca|lling <J|
|000017d0| 50 45 47 5f 49 6e 66 6f | 3e 20 6f 72 20 3c 4a 50 |PEG_Info|> or <JP|
|000017e0| 45 47 5f 46 69 6c 65 49 | 6e 66 6f 3e 2e 20 20 59 |EG_FileI|nfo>. Y|
|000017f0| 6f 75 20 63 61 6e 20 68 | 65 6e 63 65 20 65 6e 73 |ou can h|ence ens|
|00001800| 75 72 65 20 74 68 65 72 | 65 20 69 73 20 73 75 66 |ure ther|e is suf|
|00001810| 66 69 63 69 65 6e 74 20 | 66 72 65 65 20 6d 65 6d |ficient |free mem|
|00001820| 6f 72 79 20 62 65 66 6f | 72 65 20 6d 61 6b 69 6e |ory befo|re makin|
|00001830| 67 20 74 68 69 73 20 63 | 61 6c 6c 3a 20 65 6e 6f |g this c|all: eno|
|00001840| 75 67 68 20 62 6f 74 68 | 20 74 6f 20 68 6f 6c 64 |ugh both| to hold|
|00001850| 20 74 68 65 20 66 69 6c | 65 2c 20 61 6e 64 20 74 | the fil|e, and t|
|00001860| 6f 20 70 72 6f 76 69 64 | 65 20 61 6e 79 20 65 78 |o provid|e any ex|
|00001870| 74 72 61 20 77 6f 72 6b | 73 70 61 63 65 20 72 65 |tra work|space re|
|00001880| 71 75 69 72 65 64 2e 0a | 0a 54 68 69 73 20 63 61 |quired..|.This ca|
|00001890| 6c 6c 20 72 65 74 75 72 | 6e 73 20 61 6e 20 65 72 |ll retur|ns an er|
|000018a0| 72 6f 72 20 69 66 20 69 | 74 20 63 61 6e 6e 6f 74 |ror if i|t cannot|
|000018b0| 20 63 6c 61 69 6d 20 73 | 75 66 66 69 63 69 65 6e | claim s|ufficien|
|000018c0| 74 20 6d 65 6d 6f 72 79 | 20 74 6f 20 70 6c 6f 74 |t memory| to plot|
|000018d0| 20 74 68 65 20 4a 50 45 | 47 20 69 6d 61 67 65 2c | the JPE|G image,|
|000018e0| 20 6f 72 20 69 66 20 74 | 68 65 20 69 6d 61 67 65 | or if t|he image|
|000018f0| 20 61 70 70 65 61 72 73 | 20 69 6e 63 6f 6d 70 6c | appears| incompl|
|00001900| 65 74 65 20 6f 72 20 63 | 6f 72 72 75 70 74 20 69 |ete or c|orrupt i|
|00001910| 6e 20 73 6f 6d 65 20 77 | 61 79 2e 0a 0a 54 68 69 |n some w|ay...Thi|
|00001920| 73 20 63 61 6c 6c 20 69 | 73 20 6f 6e 6c 79 20 61 |s call i|s only a|
|00001930| 76 61 69 6c 61 62 6c 65 | 20 66 72 6f 6d 20 52 49 |vailable| from RI|
|00001940| 53 43 20 4f 53 20 33 2e | 36 20 6f 6e 77 61 72 64 |SC OS 3.|6 onward|
|00001950| 73 2e 00 00 44 41 54 41 | e0 06 00 00 4a 50 45 47 |s...DATA|....JPEG|
|00001960| 5f 50 6c 6f 74 54 72 61 | 6e 73 66 6f 72 6d 65 64 |_PlotTra|nsformed|
|00001970| 20 20 28 26 34 39 39 38 | 34 29 0a 45 6e 74 72 79 | (&4998|4).Entry|
|00001980| 0a 20 09 52 30 20 3d 20 | 70 6f 69 6e 74 65 72 20 |. .R0 = |pointer |
|00001990| 74 6f 20 62 75 66 66 65 | 72 20 68 6f 6c 64 69 6e |to buffe|r holdin|
|000019a0| 67 20 4a 50 45 47 20 69 | 6d 61 67 65 0a 20 09 52 |g JPEG i|mage. .R|
|000019b0| 31 20 3d 20 66 6c 61 67 | 73 3a 0a 20 09 20 09 62 |1 = flag|s:. . .b|
|000019c0| 69 74 20 30 20 73 65 74 | 20 3d 3e 20 52 32 20 3d |it 0 set| => R2 =|
|000019d0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 64 65 73 74 | pointer| to dest|
|000019e0| 69 6e 61 74 69 6f 6e 20 | 63 6f 6f 72 64 69 6e 61 |ination |coordina|
|000019f0| 74 65 20 62 6c 6f 63 6b | 2c 20 65 6c 73 65 20 74 |te block|, else t|
|00001a00| 6f 20 6d 61 74 72 69 78 | 0a 20 09 20 09 62 69 74 |o matrix|. . .bit|
|00001a10| 20 31 20 73 65 74 20 3d | 3e 20 64 69 74 68 65 72 | 1 set =|> dither|
|00001a20| 20 6f 75 74 70 75 74 20 | 77 68 65 6e 20 70 6c 6f | output |when plo|
|00001a30| 74 74 69 6e 67 20 32 34 | 20 62 69 74 20 4a 50 45 |tting 24| bit JPE|
|00001a40| 47 20 61 74 20 31 36 62 | 70 70 20 6f 72 20 62 65 |G at 16b|pp or be|
|00001a50| 6c 6f 77 0a 20 09 20 09 | 62 69 74 20 32 20 73 65 |low. . .|bit 2 se|
|00001a60| 74 20 3d 3e 20 64 69 74 | 68 65 72 69 6e 67 20 28 |t => dit|hering (|
|00001a70| 69 66 20 61 6e 79 29 20 | 69 73 20 66 75 6c 6c 20 |if any) |is full |
|00001a80| 65 72 72 6f 72 20 64 69 | 66 66 75 73 65 64 20 77 |error di|ffused w|
|00001a90| 68 65 6e 20 70 6c 6f 74 | 74 69 6e 67 20 61 74 20 |hen plot|ting at |
|00001aa0| 38 62 70 70 0a 20 09 20 | 09 61 6c 6c 20 6f 74 68 |8bpp. . |.all oth|
|00001ab0| 65 72 20 62 69 74 73 20 | 72 65 73 65 72 76 65 64 |er bits |reserved|
|00001ac0| 20 28 6d 75 73 74 20 62 | 65 20 7a 65 72 6f 29 0a | (must b|e zero).|
|00001ad0| 20 09 52 32 20 3d 20 70 | 6f 69 6e 74 65 72 20 74 | .R2 = p|ointer t|
|00001ae0| 6f 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 63 6f |o destin|ation co|
|00001af0| 6f 72 64 69 6e 61 74 65 | 20 62 6c 6f 63 6b 20 28 |ordinate| block (|
|00001b00| 69 66 20 52 32 20 62 69 | 74 20 30 20 73 65 74 29 |if R2 bi|t 0 set)|
|00001b10| 2c 20 6f 72 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |, or poi|nter to |
|00001b20| 44 72 61 77 2d 73 74 79 | 6c 65 20 74 72 61 6e 73 |Draw-sty|le trans|
|00001b30| 66 6f 72 6d 61 74 69 6f | 6e 20 6d 61 74 72 69 78 |formatio|n matrix|
|00001b40| 20 28 69 66 20 52 32 20 | 62 69 74 20 30 20 63 6c | (if R2 |bit 0 cl|
|00001b50| 65 61 72 29 0a 20 09 52 | 33 20 3d 20 6c 65 6e 67 |ear). .R|3 = leng|
|00001b60| 74 68 20 6f 66 20 4a 50 | 45 47 20 69 6d 61 67 65 |th of JP|EG image|
|00001b70| 2c 20 69 6e 20 62 79 74 | 65 73 0a 45 78 69 74 0a |, in byt|es.Exit.|
|00001b80| 20 09 52 30 20 2d 20 52 | 33 20 70 72 65 73 65 72 | .R0 - R|3 preser|
|00001b90| 76 65 64 0a 0a 54 68 69 | 73 20 53 57 49 20 64 65 |ved..Thi|s SWI de|
|00001ba0| 63 6f 6d 70 72 65 73 73 | 65 73 2c 20 74 72 61 6e |compress|es, tran|
|00001bb0| 73 66 6f 72 6d 73 2c 20 | 61 6e 64 20 70 6c 6f 74 |sforms, |and plot|
|00001bc0| 73 20 6f 6e 20 74 68 65 | 20 73 63 72 65 65 6e 20 |s on the| screen |
|00001bd0| 61 20 4a 50 45 47 20 69 | 6d 61 67 65 20 68 65 6c |a JPEG i|mage hel|
|00001be0| 64 20 69 6e 20 61 20 62 | 75 66 66 65 72 20 69 6e |d in a b|uffer in|
|00001bf0| 20 6d 65 6d 6f 72 79 2e | 0a 0a 54 68 65 20 66 75 | memory.|..The fu|
|00001c00| 6e 63 74 69 6f 6e 61 6c | 69 74 79 20 6f 66 20 74 |nctional|ity of t|
|00001c10| 68 69 73 20 63 61 6c 6c | 20 66 6f 72 20 4a 50 45 |his call| for JPE|
|00001c20| 47 73 20 69 73 20 73 69 | 6d 69 6c 61 72 20 74 6f |Gs is si|milar to|
|00001c30| 20 74 68 61 74 20 6f 66 | 20 3c 4f 53 5f 53 70 72 | that of| <OS_Spr|
|00001c40| 69 74 65 4f 70 3d 3e 53 | 57 49 3a 4f 53 5f 53 70 |iteOp=>S|WI:OS_Sp|
|00001c50| 72 69 74 65 4f 70 3e 20 | 35 36 20 28 50 75 74 20 |riteOp> |56 (Put |
|00001c60| 73 70 72 69 74 65 20 74 | 72 61 6e 73 66 6f 72 6d |sprite t|ransform|
|00001c70| 65 64 29 20 66 6f 72 20 | 73 70 72 69 74 65 73 2e |ed) for |sprites.|
|00001c80| 20 20 54 68 65 20 64 65 | 73 74 69 6e 61 74 69 6f | The de|stinatio|
|00001c90| 6e 20 63 6f 6f 72 64 69 | 6e 61 74 65 20 62 6c 6f |n coordi|nate blo|
|00001ca0| 63 6b 20 61 6e 64 20 74 | 68 65 20 74 72 61 6e 73 |ck and t|he trans|
|00001cb0| 66 6f 72 6d 61 74 69 6f | 6e 20 6d 61 74 72 69 78 |formatio|n matrix|
|00001cc0| 20 68 61 76 65 20 65 78 | 61 63 74 6c 79 20 74 68 | have ex|actly th|
|00001cd0| 65 20 73 61 6d 65 20 6d | 65 61 6e 69 6e 67 2e 20 |e same m|eaning. |
|00001ce0| 20 48 6f 77 65 76 65 72 | 2c 20 74 68 69 73 20 63 | However|, this c|
|00001cf0| 61 6c 6c 20 6f 6e 6c 79 | 20 73 75 70 70 6f 72 74 |all only| support|
|00001d00| 73 20 61 20 64 69 72 65 | 63 74 20 70 6c 6f 74 20 |s a dire|ct plot |
|00001d10| 28 69 65 20 70 6c 6f 74 | 20 61 63 74 69 6f 6e 20 |(ie plot| action |
|00001d20| 30 20 6f 66 20 4f 53 5f | 53 70 72 69 74 65 4f 70 |0 of OS_|SpriteOp|
|00001d30| 20 35 36 29 2e 0a 0a 55 | 6e 64 65 72 20 52 49 53 | 56)...U|nder RIS|
|00001d40| 43 20 4f 53 20 33 2e 36 | 20 74 68 69 73 20 63 61 |C OS 3.6| this ca|
|00001d50| 6c 6c 20 6f 6e 6c 79 20 | 73 75 70 70 6f 72 74 73 |ll only |supports|
|00001d60| 20 73 69 6d 70 6c 65 20 | 73 63 61 6c 69 6e 67 2c | simple |scaling,|
|00001d70| 20 77 69 74 68 20 6e 6f | 20 72 6f 74 61 74 69 6f | with no| rotatio|
|00001d80| 6e 20 6f 72 20 6f 74 68 | 65 72 20 74 72 61 6e 73 |n or oth|er trans|
|00001d90| 66 6f 72 6d 61 74 69 6f | 6e 20 69 6e 76 6f 6c 76 |formatio|n involv|
|00001da0| 65 64 2e 20 20 41 6e 79 | 20 75 6e 73 75 70 70 6f |ed. Any| unsuppo|
|00001db0| 72 74 65 64 20 74 72 61 | 6e 73 66 6f 72 6d 61 74 |rted tra|nsformat|
|00001dc0| 69 6f 6e 20 67 69 76 65 | 73 20 61 6e 20 61 70 70 |ion give|s an app|
|00001dd0| 72 6f 70 72 69 61 74 65 | 20 65 72 72 6f 72 2e 0a |ropriate| error..|
|00001de0| 0a 49 6e 20 70 6c 6f 74 | 74 69 6e 67 20 74 68 65 |.In plot|ting the|
|00001df0| 20 4a 50 45 47 2c 20 74 | 68 65 20 53 70 72 69 74 | JPEG, t|he Sprit|
|00001e00| 65 45 78 74 65 6e 64 20 | 6d 6f 64 75 6c 65 20 6d |eExtend |module m|
|00001e10| 61 79 20 63 6c 61 69 6d | 20 65 78 74 72 61 20 77 |ay claim| extra w|
|00001e20| 6f 72 6b 73 70 61 63 65 | 20 69 6e 20 61 20 64 79 |orkspace| in a dy|
|00001e30| 6e 61 6d 69 63 20 61 72 | 65 61 20 74 6f 20 73 74 |namic ar|ea to st|
|00001e40| 6f 72 65 20 74 61 62 6c | 65 73 20 65 74 63 2e 20 |ore tabl|es etc. |
|00001e50| 20 49 74 20 6b 65 65 70 | 73 20 74 68 65 73 65 20 | It keep|s these |
|00001e60| 63 61 63 68 65 64 20 75 | 6e 74 69 6c 20 65 69 74 |cached u|ntil eit|
|00001e70| 68 65 72 20 69 74 20 69 | 73 20 61 73 6b 65 64 20 |her it i|s asked |
|00001e80| 74 6f 20 70 6c 6f 74 20 | 61 20 64 69 66 66 65 72 |to plot |a differ|
|00001e90| 65 6e 74 20 4a 50 45 47 | 2e 20 20 59 6f 75 20 63 |ent JPEG|. You c|
|00001ea0| 61 6e 20 66 69 6e 64 20 | 6f 75 74 20 68 6f 77 20 |an find |out how |
|00001eb0| 6d 75 63 68 20 65 78 74 | 72 61 20 77 6f 72 6b 73 |much ext|ra works|
|00001ec0| 70 61 63 65 20 53 70 72 | 69 74 65 45 78 74 65 6e |pace Spr|iteExten|
|00001ed0| 64 20 77 69 6c 6c 20 72 | 65 71 75 69 72 65 20 2d |d will r|equire -|
|00001ee0| 20 69 66 20 61 6e 79 20 | 2d 20 62 79 20 66 69 72 | if any |- by fir|
|00001ef0| 73 74 20 63 61 6c 6c 69 | 6e 67 20 3c 4a 50 45 47 |st calli|ng <JPEG|
|00001f00| 5f 49 6e 66 6f 3e 20 6f | 72 20 3c 4a 50 45 47 5f |_Info> o|r <JPEG_|
|00001f10| 46 69 6c 65 49 6e 66 6f | 3e 2e 20 20 59 6f 75 20 |FileInfo|>. You |
|00001f20| 63 61 6e 20 68 65 6e 63 | 65 20 65 6e 73 75 72 65 |can henc|e ensure|
|00001f30| 20 74 68 65 72 65 20 69 | 73 20 73 75 66 66 69 63 | there i|s suffic|
|00001f40| 69 65 6e 74 20 66 72 65 | 65 20 6d 65 6d 6f 72 79 |ient fre|e memory|
|00001f50| 20 62 65 66 6f 72 65 20 | 6d 61 6b 69 6e 67 20 74 | before |making t|
|00001f60| 68 69 73 20 63 61 6c 6c | 2e 0a 0a 54 68 69 73 20 |his call|...This |
|00001f70| 63 61 6c 6c 20 72 65 74 | 75 72 6e 73 20 61 6e 20 |call ret|urns an |
|00001f80| 65 72 72 6f 72 20 69 66 | 20 69 74 20 63 61 6e 6e |error if| it cann|
|00001f90| 6f 74 20 63 6c 61 69 6d | 20 73 75 66 66 69 63 69 |ot claim| suffici|
|00001fa0| 65 6e 74 20 6d 65 6d 6f | 72 79 20 74 6f 20 70 6c |ent memo|ry to pl|
|00001fb0| 6f 74 20 74 68 65 20 4a | 50 45 47 20 69 6d 61 67 |ot the J|PEG imag|
|00001fc0| 65 2c 20 6f 72 20 69 66 | 20 74 68 65 20 69 6d 61 |e, or if| the ima|
|00001fd0| 67 65 20 61 70 70 65 61 | 72 73 20 69 6e 63 6f 6d |ge appea|rs incom|
|00001fe0| 70 6c 65 74 65 20 6f 72 | 20 63 6f 72 72 75 70 74 |plete or| corrupt|
|00001ff0| 20 69 6e 20 73 6f 6d 65 | 20 77 61 79 2e 0a 0a 54 | in some| way...T|
|00002000| 68 69 73 20 63 61 6c 6c | 20 69 73 20 6f 6e 6c 79 |his call| is only|
|00002010| 20 61 76 61 69 6c 61 62 | 6c 65 20 66 72 6f 6d 20 | availab|le from |
|00002020| 52 49 53 43 20 4f 53 20 | 33 2e 36 20 6f 6e 77 61 |RISC OS |3.6 onwa|
|00002030| 72 64 73 2e 44 41 54 41 | 6c 09 00 00 4a 50 45 47 |rds.DATA|l...JPEG|
|00002040| 5f 50 6c 6f 74 46 69 6c | 65 54 72 61 6e 73 66 6f |_PlotFil|eTransfo|
|00002050| 72 6d 65 64 20 20 28 26 | 34 39 39 38 35 29 0a 45 |rmed (&|49985).E|
|00002060| 6e 74 72 79 0a 20 09 52 | 30 20 3d 20 70 6f 69 6e |ntry. .R|0 = poin|
|00002070| 74 65 72 20 74 6f 20 70 | 61 74 68 6e 61 6d 65 20 |ter to p|athname |
|00002080| 6f 66 20 4a 50 45 47 20 | 66 69 6c 65 2c 20 63 6f |of JPEG |file, co|
|00002090| 6e 74 72 6f 6c 20 63 68 | 61 72 61 63 74 65 72 20 |ntrol ch|aracter |
|000020a0| 74 65 72 6d 69 6e 61 74 | 65 64 0a 20 09 52 31 20 |terminat|ed. .R1 |
|000020b0| 3d 20 66 6c 61 67 73 3a | 0a 20 09 20 09 62 69 74 |= flags:|. . .bit|
|000020c0| 20 30 20 73 65 74 20 3d | 3e 20 52 32 20 3d 20 70 | 0 set =|> R2 = p|
|000020d0| 6f 69 6e 74 65 72 20 74 | 6f 20 64 65 73 74 69 6e |ointer t|o destin|
|000020e0| 61 74 69 6f 6e 20 63 6f | 6f 72 64 69 6e 61 74 65 |ation co|ordinate|
|000020f0| 20 62 6c 6f 63 6b 2c 20 | 65 6c 73 65 20 74 6f 20 | block, |else to |
|00002100| 6d 61 74 72 69 78 0a 20 | 09 20 09 62 69 74 20 31 |matrix. |. .bit 1|
|00002110| 20 73 65 74 20 3d 3e 20 | 64 69 74 68 65 72 20 6f | set => |dither o|
|00002120| 75 74 70 75 74 20 77 68 | 65 6e 20 70 6c 6f 74 74 |utput wh|en plott|
|00002130| 69 6e 67 20 32 34 20 62 | 69 74 20 4a 50 45 47 20 |ing 24 b|it JPEG |
|00002140| 61 74 20 31 36 62 70 70 | 20 6f 72 20 62 65 6c 6f |at 16bpp| or belo|
|00002150| 77 0a 20 09 20 09 62 69 | 74 20 32 20 73 65 74 20 |w. . .bi|t 2 set |
|00002160| 3d 3e 20 64 69 74 68 65 | 72 69 6e 67 20 28 69 66 |=> dithe|ring (if|
|00002170| 20 61 6e 79 29 20 69 73 | 20 66 75 6c 6c 20 65 72 | any) is| full er|
|00002180| 72 6f 72 20 64 69 66 66 | 75 73 65 64 20 77 68 65 |ror diff|used whe|
|00002190| 6e 20 70 6c 6f 74 74 69 | 6e 67 20 61 74 20 38 62 |n plotti|ng at 8b|
|000021a0| 70 70 0a 20 09 20 09 61 | 6c 6c 20 6f 74 68 65 72 |pp. . .a|ll other|
|000021b0| 20 62 69 74 73 20 72 65 | 73 65 72 76 65 64 20 28 | bits re|served (|
|000021c0| 6d 75 73 74 20 62 65 20 | 7a 65 72 6f 29 0a 20 09 |must be |zero). .|
|000021d0| 52 32 20 3d 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |R2 = poi|nter to |
|000021e0| 64 65 73 74 69 6e 61 74 | 69 6f 6e 20 63 6f 6f 72 |destinat|ion coor|
|000021f0| 64 69 6e 61 74 65 20 62 | 6c 6f 63 6b 20 28 69 66 |dinate b|lock (if|
|00002200| 20 52 32 20 62 69 74 20 | 30 20 73 65 74 29 2c 20 | R2 bit |0 set), |
|00002210| 6f 72 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 44 72 |or point|er to Dr|
|00002220| 61 77 2d 73 74 79 6c 65 | 20 74 72 61 6e 73 66 6f |aw-style| transfo|
|00002230| 72 6d 61 74 69 6f 6e 20 | 6d 61 74 72 69 78 20 28 |rmation |matrix (|
|00002240| 69 66 20 52 32 20 62 69 | 74 20 30 20 63 6c 65 61 |if R2 bi|t 0 clea|
|00002250| 72 29 0a 0a 45 78 69 74 | 0a 20 09 52 30 20 2d 20 |r)..Exit|. .R0 - |
|00002260| 52 32 20 70 72 65 73 65 | 72 76 65 64 0a 0a 54 68 |R2 prese|rved..Th|
|00002270| 65 20 53 57 49 20 64 65 | 63 6f 6d 70 72 65 73 73 |e SWI de|compress|
|00002280| 65 73 2c 20 74 72 61 6e | 73 66 6f 72 6d 73 2c 20 |es, tran|sforms, |
|00002290| 61 6e 64 20 70 6c 6f 74 | 73 20 6f 6e 20 74 68 65 |and plot|s on the|
|000022a0| 20 73 63 72 65 65 6e 20 | 61 20 4a 50 45 47 20 69 | screen |a JPEG i|
|000022b0| 6d 61 67 65 20 68 65 6c | 64 20 69 6e 20 61 20 66 |mage hel|d in a f|
|000022c0| 69 6c 65 2e 0a 0a 54 68 | 65 20 66 75 6e 63 74 69 |ile...Th|e functi|
|000022d0| 6f 6e 61 6c 69 74 79 20 | 6f 66 20 74 68 69 73 20 |onality |of this |
|000022e0| 63 61 6c 6c 20 66 6f 72 | 20 4a 50 45 47 73 20 69 |call for| JPEGs i|
|000022f0| 73 20 73 69 6d 69 6c 61 | 72 20 74 6f 20 74 68 61 |s simila|r to tha|
|00002300| 74 20 6f 66 20 3c 4f 53 | 5f 53 70 72 69 74 65 4f |t of <OS|_SpriteO|
|00002310| 70 3d 3e 53 57 49 3a 4f | 53 5f 53 70 72 69 74 65 |p=>SWI:O|S_Sprite|
|00002320| 4f 70 3e 20 35 36 20 28 | 50 75 74 20 73 70 72 69 |Op> 56 (|Put spri|
|00002330| 74 65 20 74 72 61 6e 73 | 66 6f 72 6d 65 64 29 20 |te trans|formed) |
|00002340| 66 6f 72 20 73 70 72 69 | 74 65 73 2e 20 20 54 68 |for spri|tes. Th|
|00002350| 65 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 63 6f |e destin|ation co|
|00002360| 6f 72 64 69 6e 61 74 65 | 20 62 6c 6f 63 6b 20 61 |ordinate| block a|
|00002370| 6e 64 20 74 68 65 20 74 | 72 61 6e 73 66 6f 72 6d |nd the t|ransform|
|00002380| 61 74 69 6f 6e 20 6d 61 | 74 72 69 78 20 68 61 76 |ation ma|trix hav|
|00002390| 65 20 65 78 61 63 74 6c | 79 20 74 68 65 20 73 61 |e exactl|y the sa|
|000023a0| 6d 65 20 6d 65 61 6e 69 | 6e 67 2e 20 20 48 6f 77 |me meani|ng. How|
|000023b0| 65 76 65 72 2c 20 74 68 | 69 73 20 63 61 6c 6c 20 |ever, th|is call |
|000023c0| 6f 6e 6c 79 20 73 75 70 | 70 6f 72 74 73 20 61 20 |only sup|ports a |
|000023d0| 64 69 72 65 63 74 20 70 | 6c 6f 74 20 28 69 65 20 |direct p|lot (ie |
|000023e0| 70 6c 6f 74 20 61 63 74 | 69 6f 6e 20 30 20 6f 66 |plot act|ion 0 of|
|000023f0| 20 4f 53 5f 53 70 72 69 | 74 65 4f 70 20 35 36 29 | OS_Spri|teOp 56)|
|00002400| 2e 0a 0a 55 6e 64 65 72 | 20 52 49 53 43 20 4f 53 |...Under| RISC OS|
|00002410| 20 33 2e 36 20 74 68 69 | 73 20 63 61 6c 6c 20 6f | 3.6 thi|s call o|
|00002420| 6e 6c 79 20 73 75 70 70 | 6f 72 74 73 20 73 69 6d |nly supp|orts sim|
|00002430| 70 6c 65 20 73 63 61 6c | 69 6e 67 2c 20 77 69 74 |ple scal|ing, wit|
|00002440| 68 20 6e 6f 20 72 6f 74 | 61 74 69 6f 6e 20 6f 72 |h no rot|ation or|
|00002450| 20 6f 74 68 65 72 20 74 | 72 61 6e 73 66 6f 72 6d | other t|ransform|
|00002460| 61 74 69 6f 6e 20 69 6e | 76 6f 6c 76 65 64 2e 20 |ation in|volved. |
|00002470| 20 41 6e 79 20 75 6e 73 | 75 70 70 6f 72 74 65 64 | Any uns|upported|
|00002480| 20 74 72 61 6e 73 66 6f | 72 6d 61 74 69 6f 6e 20 | transfo|rmation |
|00002490| 67 69 76 65 73 20 61 6e | 20 61 70 70 72 6f 70 72 |gives an| appropr|
|000024a0| 69 61 74 65 20 65 72 72 | 6f 72 2e 0a 0a 54 68 65 |iate err|or...The|
|000024b0| 20 66 69 6c 65 20 69 73 | 20 6c 6f 61 64 65 64 20 | file is| loaded |
|000024c0| 69 6e 74 6f 20 6d 65 6d | 6f 72 79 20 66 6f 72 20 |into mem|ory for |
|000024d0| 74 68 65 20 64 75 72 61 | 74 69 6f 6e 20 6f 66 20 |the dura|tion of |
|000024e0| 74 68 65 20 63 61 6c 6c | 2c 20 62 75 74 20 69 73 |the call|, but is|
|000024f0| 20 6e 6f 74 20 63 61 63 | 68 65 64 2e 20 20 54 68 | not cac|hed. Th|
|00002500| 69 73 20 63 61 6c 6c 20 | 74 68 65 72 65 66 6f 72 |is call |therefor|
|00002510| 65 20 75 73 65 73 20 61 | 73 20 6d 75 63 68 20 6d |e uses a|s much m|
|00002520| 65 6d 6f 72 79 20 61 73 | 20 6c 6f 61 64 69 6e 67 |emory as| loading|
|00002530| 20 74 68 65 20 66 69 6c | 65 20 69 6e 74 6f 20 61 | the fil|e into a|
|00002540| 20 62 75 66 66 65 72 20 | 79 6f 75 72 73 65 6c 66 | buffer |yourself|
|00002550| 20 61 6e 64 20 74 68 65 | 6e 20 63 61 6c 6c 69 6e | and the|n callin|
|00002560| 67 20 3c 4a 50 45 47 5f | 50 6c 6f 74 54 72 61 6e |g <JPEG_|PlotTran|
|00002570| 73 66 6f 72 6d 65 64 3e | 2c 20 61 6e 64 20 67 69 |sformed>|, and gi|
|00002580| 76 65 73 20 79 6f 75 20 | 6e 6f 74 20 63 6f 6e 74 |ves you |not cont|
|00002590| 72 6f 6c 20 6f 76 65 72 | 20 77 68 65 74 68 65 72 |rol over| whether|
|000025a0| 20 74 68 65 20 69 6d 61 | 67 65 20 72 65 6d 61 69 | the ima|ge remai|
|000025b0| 6e 73 20 63 61 63 68 65 | 64 2e 20 20 46 75 72 74 |ns cache|d. Furt|
|000025c0| 68 65 72 6d 6f 72 65 2c | 20 61 6c 74 68 6f 75 67 |hermore,| althoug|
|000025d0| 68 20 74 68 65 20 6d 65 | 63 68 61 6e 69 73 6d 20 |h the me|chanism |
|000025e0| 65 78 69 73 74 73 20 74 | 6f 20 70 61 73 73 20 74 |exists t|o pass t|
|000025f0| 68 69 73 20 63 61 6c 6c | 20 6f 6e 20 74 6f 20 74 |his call| on to t|
|00002600| 68 65 20 70 72 69 6e 74 | 65 72 20 64 72 69 76 65 |he print|er drive|
|00002610| 72 73 2c 20 74 68 65 79 | 20 64 6f 20 6e 6f 74 20 |rs, they| do not |
|00002620| 73 75 70 70 6f 72 74 20 | 69 74 2e 20 20 57 65 20 |support |it. We |
|00002630| 74 68 65 72 65 66 6f 72 | 65 20 73 74 72 6f 6e 67 |therefor|e strong|
|00002640| 6c 79 20 72 65 63 6f 6d | 6d 65 6e 64 20 74 68 61 |ly recom|mend tha|
|00002650| 74 20 79 6f 75 20 75 73 | 65 20 4a 50 45 47 5f 50 |t you us|e JPEG_P|
|00002660| 6c 6f 74 54 72 61 6e 73 | 66 6f 72 6d 65 64 20 69 |lotTrans|formed i|
|00002670| 6e 20 70 72 65 66 65 72 | 65 6e 63 65 20 74 6f 20 |n prefer|ence to |
|00002680| 74 68 69 73 20 63 61 6c | 6c 2e 0a 0a 41 73 20 77 |this cal|l...As w|
|00002690| 65 6c 6c 20 61 73 20 74 | 68 65 20 6d 65 6d 6f 72 |ell as t|he memor|
|000026a0| 79 20 74 6f 20 68 6f 6c | 64 20 74 68 65 20 66 69 |y to hol|d the fi|
|000026b0| 6c 65 2c 20 74 68 65 20 | 53 70 72 69 74 65 45 78 |le, the |SpriteEx|
|000026c0| 74 65 6e 64 20 6d 6f 64 | 75 6c 65 20 6d 61 79 20 |tend mod|ule may |
|000026d0| 63 6c 61 69 6d 20 65 78 | 74 72 61 20 77 6f 72 6b |claim ex|tra work|
|000026e0| 73 70 61 63 65 20 69 6e | 20 61 20 64 79 6e 61 6d |space in| a dynam|
|000026f0| 69 63 20 61 72 65 61 20 | 74 6f 20 73 74 6f 72 65 |ic area |to store|
|00002700| 20 74 61 62 6c 65 73 20 | 65 74 63 2e 20 20 49 74 | tables |etc. It|
|00002710| 20 6b 65 65 70 73 20 74 | 68 65 73 65 20 63 61 63 | keeps t|hese cac|
|00002720| 68 65 64 20 75 6e 74 69 | 6c 20 65 69 74 68 65 72 |hed unti|l either|
|00002730| 20 69 74 20 69 73 20 61 | 73 6b 65 64 20 74 6f 20 | it is a|sked to |
|00002740| 70 6c 6f 74 20 61 20 64 | 69 66 66 65 72 65 6e 74 |plot a d|ifferent|
|00002750| 20 4a 50 45 47 2c 20 6f | 72 20 74 68 65 20 75 73 | JPEG, o|r the us|
|00002760| 65 72 20 64 65 63 72 65 | 61 73 65 73 20 74 68 65 |er decre|ases the|
|00002770| 20 64 79 6e 61 6d 69 63 | 20 61 72 65 61 27 73 20 | dynamic| area's |
|00002780| 73 69 7a 65 2e 20 20 54 | 68 69 73 20 73 70 65 65 |size. T|his spee|
|00002790| 64 73 20 75 70 20 73 75 | 63 63 65 73 73 69 76 65 |ds up su|ccessive|
|000027a0| 20 72 65 70 6c 6f 74 73 | 20 6f 66 20 74 68 65 20 | replots| of the |
|000027b0| 73 61 6d 65 20 4a 50 45 | 47 2e 20 20 59 6f 75 20 |same JPE|G. You |
|000027c0| 63 61 6e 20 66 69 6e 64 | 20 6f 75 74 20 68 6f 77 |can find| out how|
|000027d0| 20 6d 75 63 68 20 65 78 | 74 72 61 20 77 6f 72 6b | much ex|tra work|
|000027e0| 73 70 61 63 65 20 53 70 | 72 69 74 65 45 78 74 65 |space Sp|riteExte|
|000027f0| 6e 64 20 77 69 6c 6c 20 | 72 65 71 75 69 72 65 20 |nd will |require |
|00002800| 2d 20 69 66 20 61 6e 79 | 20 2d 20 62 79 20 66 69 |- if any| - by fi|
|00002810| 72 73 74 20 63 61 6c 6c | 69 6e 67 20 3c 4a 50 45 |rst call|ing <JPE|
|00002820| 47 5f 49 6e 66 6f 3e 20 | 6f 72 20 3c 4a 50 45 47 |G_Info> |or <JPEG|
|00002830| 5f 46 69 6c 65 49 6e 66 | 6f 3e 2e 20 20 59 6f 75 |_FileInf|o>. You|
|00002840| 20 63 61 6e 20 68 65 6e | 63 65 20 65 6e 73 75 72 | can hen|ce ensur|
|00002850| 65 20 74 68 65 72 65 20 | 69 73 20 73 75 66 66 69 |e there |is suffi|
|00002860| 63 69 65 6e 74 20 66 72 | 65 65 20 6d 65 6d 6f 72 |cient fr|ee memor|
|00002870| 79 20 62 65 66 6f 72 65 | 20 6d 61 6b 69 6e 67 20 |y before| making |
|00002880| 74 68 69 73 20 63 61 6c | 6c 3a 20 65 6e 6f 75 67 |this cal|l: enoug|
|00002890| 68 20 62 6f 74 68 20 74 | 6f 20 68 6f 6c 64 20 74 |h both t|o hold t|
|000028a0| 68 65 20 66 69 6c 65 2c | 20 61 6e 64 20 74 6f 20 |he file,| and to |
|000028b0| 70 72 6f 76 69 64 65 20 | 61 6e 79 20 65 78 74 72 |provide |any extr|
|000028c0| 61 20 77 6f 72 6b 73 70 | 61 63 65 20 72 65 71 75 |a worksp|ace requ|
|000028d0| 69 72 65 64 2e 0a 0a 54 | 68 69 73 20 63 61 6c 6c |ired...T|his call|
|000028e0| 20 72 65 74 75 72 6e 73 | 20 61 6e 20 65 72 72 6f | returns| an erro|
|000028f0| 72 20 69 66 20 69 74 20 | 63 61 6e 6e 6f 74 20 63 |r if it |cannot c|
|00002900| 6c 61 69 6d 20 73 75 66 | 66 69 63 69 65 6e 74 20 |laim suf|ficient |
|00002910| 6d 65 6d 6f 72 79 20 74 | 6f 20 70 6c 6f 74 20 74 |memory t|o plot t|
|00002920| 68 65 20 4a 50 45 47 20 | 69 6d 61 67 65 2c 20 6f |he JPEG |image, o|
|00002930| 72 20 69 66 20 74 68 65 | 20 69 6d 61 67 65 20 61 |r if the| image a|
|00002940| 70 70 65 61 72 73 20 69 | 6e 63 6f 6d 70 6c 65 74 |ppears i|ncomplet|
|00002950| 65 20 6f 72 20 63 6f 72 | 72 75 70 74 20 69 6e 20 |e or cor|rupt in |
|00002960| 73 6f 6d 65 20 77 61 79 | 2e 0a 0a 54 68 69 73 20 |some way|...This |
|00002970| 63 61 6c 6c 20 69 73 20 | 6f 6e 6c 79 20 61 76 61 |call is |only ava|
|00002980| 69 6c 61 62 6c 65 20 66 | 72 6f 6d 20 52 49 53 43 |ilable f|rom RISC|
|00002990| 20 4f 53 20 33 2e 36 20 | 6f 6e 77 61 72 64 73 2e | OS 3.6 |onwards.|
|000029a0| 44 41 54 41 38 02 00 00 | 4a 50 45 47 5f 50 44 72 |DATA8...|JPEG_PDr|
|000029b0| 69 76 65 72 49 6e 74 65 | 72 63 65 70 74 20 20 28 |iverInte|rcept (|
|000029c0| 26 34 39 39 38 36 29 0a | 45 6e 74 72 79 0a 20 09 |&49986).|Entry. .|
|000029d0| 52 30 20 3d 20 66 6c 61 | 67 73 3a 0a 20 09 20 09 |R0 = fla|gs:. . .|
|000029e0| 62 69 74 20 30 20 73 65 | 74 20 3d 3e 20 70 61 73 |bit 0 se|t => pas|
|000029f0| 73 20 6f 6e 20 70 6c 6f | 74 74 69 6e 67 20 63 61 |s on plo|tting ca|
|00002a00| 6c 6c 73 2c 20 63 6c 65 | 61 72 20 3d 3e 20 64 6f |lls, cle|ar => do|
|00002a10| 6e 27 74 20 70 61 73 73 | 20 6f 6e 20 70 6c 6f 74 |n't pass| on plot|
|00002a20| 74 69 6e 67 20 63 61 6c | 6c 73 0a 20 09 20 09 62 |ting cal|ls. . .b|
|00002a30| 69 74 20 31 20 73 65 74 | 20 3d 3e 20 75 73 65 20 |it 1 set| => use |
|00002a40| 74 72 61 6e 73 6c 61 74 | 69 6f 6e 20 74 61 62 6c |translat|ion tabl|
|00002a50| 65 73 2c 20 63 6c 65 61 | 72 20 3d 3e 20 64 6f 6e |es, clea|r => don|
|00002a60| 27 74 20 75 73 65 20 74 | 72 61 6e 73 6c 61 74 69 |'t use t|ranslati|
|00002a70| 6f 6e 20 74 61 62 6c 65 | 73 0a 20 20 09 20 09 61 |on table|s. . .a|
|00002a80| 6c 6c 20 6f 74 68 65 72 | 20 62 69 74 73 20 72 65 |ll other| bits re|
|00002a90| 73 65 72 76 65 64 20 28 | 6d 75 73 74 20 62 65 20 |served (|must be |
|00002aa0| 7a 65 72 6f 29 0a 45 78 | 69 74 0a 20 09 52 30 20 |zero).Ex|it. .R0 |
|00002ab0| 3d 20 70 72 65 76 69 6f | 75 73 20 69 6e 74 65 72 |= previo|us inter|
|00002ac0| 63 65 70 74 20 73 74 61 | 74 65 0a 0a 54 68 69 73 |cept sta|te..This|
|00002ad0| 20 53 57 49 20 69 73 20 | 75 73 65 64 20 62 79 20 | SWI is |used by |
|00002ae0| 74 68 65 20 70 72 69 6e | 74 65 72 20 64 72 69 76 |the prin|ter driv|
|00002af0| 65 72 73 20 74 6f 20 72 | 65 71 75 65 73 74 20 74 |ers to r|equest t|
|00002b00| 68 61 74 20 53 70 72 69 | 74 65 45 78 74 65 6e 64 |hat Spri|teExtend|
|00002b10| 20 70 61 73 73 65 73 20 | 6f 6e 20 61 6c 6c 20 63 | passes |on all c|
|00002b20| 61 6c 6c 73 20 74 6f 20 | 4a 50 45 47 20 70 6c 6f |alls to |JPEG plo|
|00002b30| 74 74 69 6e 67 20 53 57 | 49 73 20 62 79 20 69 74 |tting SW|Is by it|
|00002b40| 73 65 6c 66 20 63 61 6c | 6c 69 6e 67 20 50 44 72 |self cal|ling PDr|
|00002b50| 69 76 65 72 5f 4a 50 45 | 47 53 57 49 2e 20 20 57 |iver_JPE|GSWI. W|
|00002b60| 68 65 6e 20 53 70 72 69 | 74 65 45 78 74 65 6e 64 |hen Spri|teExtend|
|00002b70| 20 70 61 73 73 65 73 20 | 6f 6e 20 74 68 65 73 65 | passes |on these|
|00002b80| 20 63 61 6c 6c 73 2c 20 | 69 74 20 69 67 6e 6f 72 | calls, |it ignor|
|00002b90| 65 73 20 74 68 65 6d 20 | 69 74 73 65 6c 66 2e 0a |es them |itself..|
|00002ba0| 0a 59 6f 75 20 6d 75 73 | 74 20 6e 6f 74 20 6d 61 |.You mus|t not ma|
|00002bb0| 6b 65 20 74 68 69 73 20 | 63 61 6c 6c 20 66 72 6f |ke this |call fro|
|00002bc0| 6d 20 79 6f 75 72 20 6f | 77 6e 20 61 70 70 6c 69 |m your o|wn appli|
|00002bd0| 63 61 74 69 6f 6e 73 2e | 44 49 52 24 70 00 00 00 |cations.|DIR$p...|
|00002be0| 70 00 00 00 48 2c 00 00 | 46 ff ff ff c7 ba 42 dc |p...H,..|F.....B.|
|00002bf0| ee 04 00 00 13 00 00 00 | 00 00 00 00 53 74 61 72 |........|....Star|
|00002c00| 74 00 00 00 38 31 00 00 | 46 ff ff ff 0d 95 42 dc |t...81..|F.....B.|
|00002c10| d3 01 00 00 13 00 00 00 | 00 00 00 00 57 72 69 74 |........|....Writ|
|00002c20| 65 4c 69 6e 65 00 00 00 | 0c 33 00 00 46 ff ff ff |eLine...|.3..F...|
|00002c30| 3a d8 42 dc 1b 01 00 00 | 13 00 00 00 00 00 00 00 |:.B.....|........|
|00002c40| 46 69 6e 69 73 68 00 00 | 44 41 54 41 ee 04 00 00 |Finish..|DATA....|
|00002c50| 43 6f 6d 70 72 65 73 73 | 4a 50 45 47 5f 53 74 61 |Compress|JPEG_Sta|
|00002c60| 72 74 20 20 28 26 34 41 | 35 30 30 29 0a 45 6e 74 |rt (&4A|500).Ent|
|00002c70| 72 79 0a 20 09 52 30 20 | 3d 20 70 6f 69 6e 74 65 |ry. .R0 |= pointe|
|00002c80| 72 20 74 6f 20 62 75 66 | 66 65 72 20 66 6f 72 20 |r to buf|fer for |
|00002c90| 4a 50 45 47 20 64 61 74 | 61 0a 20 09 52 31 20 3d |JPEG dat|a. .R1 =|
|00002ca0| 20 73 69 7a 65 20 6f 66 | 20 4a 50 45 47 20 64 61 | size of| JPEG da|
|00002cb0| 74 61 20 62 75 66 66 65 | 72 0a 20 09 52 32 20 3d |ta buffe|r. .R2 =|
|00002cc0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 62 6c 6f 63 | pointer| to bloc|
|00002cd0| 6b 20 6f 66 20 70 61 72 | 61 6d 65 74 65 72 73 0a |k of par|ameters.|
|00002ce0| 20 09 20 09 2b 30 09 77 | 69 64 74 68 20 6f 66 20 | . .+0.w|idth of |
|00002cf0| 69 6d 61 67 65 20 69 6e | 20 70 69 78 65 6c 73 0a |image in| pixels.|
|00002d00| 20 09 20 09 2b 34 09 68 | 65 69 67 68 74 20 6f 66 | . .+4.h|eight of|
|00002d10| 20 69 6d 61 67 65 20 69 | 6e 20 70 69 78 65 6c 73 | image i|n pixels|
|00002d20| 0a 20 09 20 09 2b 38 09 | 71 75 61 6c 69 74 79 20 |. . .+8.|quality |
|00002d30| 76 61 6c 75 65 20 28 30 | 20 2d 20 31 30 30 29 3a |value (0| - 100):|
|00002d40| 20 6c 6f 77 65 72 20 71 | 75 61 6c 69 74 79 20 72 | lower q|uality r|
|00002d50| 65 73 75 6c 74 73 20 69 | 6e 20 73 6d 61 6c 6c 65 |esults i|n smalle|
|00002d60| 72 20 69 6d 61 67 65 0a | 20 09 20 09 2b 31 32 09 |r image.| . .+12.|
|00002d70| 6e 75 6d 62 65 72 20 69 | 66 20 38 20 62 69 74 20 |number i|f 8 bit |
|00002d80| 63 6f 6d 70 6f 6e 65 6e | 74 73 20 69 6e 20 73 6f |componen|ts in so|
|00002d90| 75 72 63 65 3a 20 33 20 | 3d 3e 20 32 34 20 62 69 |urce: 3 |=> 24 bi|
|00002da0| 74 20 63 6f 6c 6f 75 72 | 2c 20 31 20 3d 3e 20 38 |t colour|, 1 => 8|
|00002db0| 20 62 69 74 20 67 72 65 | 79 73 63 61 6c 65 0a 20 | bit gre|yscale. |
|00002dc0| 09 20 09 2b 31 36 09 68 | 6f 72 69 7a 6f 6e 74 61 |. .+16.h|orizonta|
|00002dd0| 6c 20 44 50 49 20 6f 66 | 20 69 6d 61 67 65 2c 20 |l DPI of| image, |
|00002de0| 6f 72 20 30 20 69 66 20 | 75 6e 6b 6e 6f 77 6e 0a |or 0 if |unknown.|
|00002df0| 20 09 20 09 2b 32 30 09 | 76 65 72 74 69 63 61 6c | . .+20.|vertical|
|00002e00| 20 44 50 49 20 6f 66 20 | 69 6d 61 67 65 2c 20 6f | DPI of |image, o|
|00002e10| 72 20 30 20 69 66 20 75 | 6e 6b 6e 6f 77 6e 0a 20 |r 0 if u|nknown. |
|00002e20| 09 52 33 20 3d 20 70 6f | 69 6e 74 65 72 20 74 6f |.R3 = po|inter to|
|00002e30| 20 77 6f 72 6b 73 70 61 | 63 65 20 61 72 65 61 2c | workspa|ce area,|
|00002e40| 20 6f 72 20 30 20 66 6f | 72 20 74 68 65 20 43 6f | or 0 fo|r the Co|
|00002e50| 6d 70 72 65 73 73 4a 50 | 45 47 20 6d 6f 64 75 6c |mpressJP|EG modul|
|00002e60| 65 20 74 6f 20 61 6c 6c | 6f 63 61 74 65 20 69 74 |e to all|ocate it|
|00002e70| 73 20 6f 77 6e 20 77 6f | 72 6b 73 70 61 63 65 20 |s own wo|rkspace |
|00002e80| 66 72 6f 6d 20 74 68 65 | 20 52 4d 41 0a 20 09 52 |from the| RMA. .R|
|00002e90| 34 20 3d 20 73 69 7a 65 | 20 6f 66 20 77 6f 72 6b |4 = size| of work|
|00002ea0| 73 70 61 63 65 20 61 72 | 65 61 20 28 69 66 20 52 |space ar|ea (if R|
|00002eb0| 33 20 2f 3d 20 30 29 0a | 45 78 69 74 0a 20 09 52 |3 /= 0).|Exit. .R|
|00002ec0| 30 20 3d 20 4a 50 45 47 | 20 74 61 67 2c 20 74 6f |0 = JPEG| tag, to|
|00002ed0| 20 62 65 20 70 61 73 73 | 65 64 20 74 6f 20 6f 74 | be pass|ed to ot|
|00002ee0| 68 65 72 20 43 6f 6d 70 | 72 65 73 73 4a 50 45 47 |her Comp|ressJPEG|
|00002ef0| 20 53 57 49 73 0a 0a 54 | 68 69 73 20 63 61 6c 6c | SWIs..T|his call|
|00002f00| 20 73 74 61 72 74 73 20 | 74 68 65 20 4a 50 45 47 | starts |the JPEG|
|00002f10| 20 63 6f 6d 70 72 65 73 | 73 69 6f 6e 20 70 72 6f | compres|sion pro|
|00002f20| 63 65 73 73 2c 20 73 65 | 74 74 69 6e 67 20 75 70 |cess, se|tting up|
|00002f30| 20 76 61 72 69 6f 75 73 | 20 70 61 72 61 6d 65 74 | various| paramet|
|00002f40| 65 72 73 20 66 6f 72 20 | 69 74 2e 0a 0a 54 68 65 |ers for |it...The|
|00002f50| 20 62 75 66 66 65 72 20 | 66 6f 72 20 74 68 65 20 | buffer |for the |
|00002f60| 4a 50 45 47 20 64 61 74 | 61 20 73 68 6f 75 6c 64 |JPEG dat|a should|
|00002f70| 20 62 65 20 61 73 20 6c | 61 72 67 65 20 61 73 20 | be as l|arge as |
|00002f80| 70 6f 73 73 69 62 6c 65 | 2c 20 73 69 6e 63 65 20 |possible|, since |
|00002f90| 74 68 65 20 4a 50 45 47 | 20 63 6f 6d 70 72 65 73 |the JPEG| compres|
|00002fa0| 73 69 6f 6e 20 72 6f 75 | 74 69 6e 65 73 20 63 61 |sion rou|tines ca|
|00002fb0| 6e 6e 6f 74 20 67 75 61 | 72 61 6e 74 65 65 20 74 |nnot gua|rantee t|
|00002fc0| 6f 20 63 6f 6d 70 72 65 | 73 73 20 74 68 65 20 69 |o compre|ss the i|
|00002fd0| 6d 61 67 65 20 62 79 20 | 61 20 66 69 78 65 64 20 |mage by |a fixed |
|00002fe0| 61 6d 6f 75 6e 74 2e 0a | 0a 49 66 20 79 6f 75 20 |amount..|.If you |
|00002ff0| 77 69 73 68 20 74 6f 20 | 73 75 70 70 6c 79 20 79 |wish to |supply y|
|00003000| 6f 75 72 20 6f 77 6e 20 | 77 6f 72 6b 73 70 61 63 |our own |workspac|
|00003010| 65 20 61 72 65 61 2c 20 | 69 74 73 20 72 65 71 75 |e area, |its requ|
|00003020| 69 72 65 64 20 73 69 7a | 65 20 66 6f 72 20 61 20 |ired siz|e for a |
|00003030| 63 6f 6c 6f 75 72 20 28 | 32 34 20 62 69 74 29 20 |colour (|24 bit) |
|00003040| 69 6d 61 67 65 20 69 73 | 3a 0a 20 09 32 30 30 30 |image is|:. .2000|
|00003050| 30 20 2b 20 28 28 69 6d | 61 67 65 20 77 69 64 74 |0 + ((im|age widt|
|00003060| 68 20 72 6f 75 6e 64 65 | 64 20 75 70 20 74 6f 20 |h rounde|d up to |
|00003070| 61 20 6d 75 6c 74 69 70 | 6c 65 20 6f 66 20 31 36 |a multip|le of 16|
|00003080| 29 20 d7 20 33 30 29 0a | 61 6e 64 20 69 74 73 20 |) . 30).|and its |
|00003090| 72 65 71 75 69 72 65 64 | 20 73 69 7a 65 20 66 6f |required| size fo|
|000030a0| 72 20 61 20 67 72 65 79 | 73 63 61 6c 65 20 28 38 |r a grey|scale (8|
|000030b0| 20 62 69 74 29 20 69 6d | 61 67 65 20 69 73 3a 0a | bit) im|age is:.|
|000030c0| 20 09 32 30 30 30 30 20 | 2b 20 28 28 69 6d 61 67 | .20000 |+ ((imag|
|000030d0| 65 20 77 69 64 74 68 20 | 72 6f 75 6e 64 65 64 20 |e width |rounded |
|000030e0| 75 70 20 74 6f 20 61 20 | 6d 75 6c 74 69 70 6c 65 |up to a |multiple|
|000030f0| 20 6f 66 20 31 36 29 20 | d7 20 39 29 0a 0a 41 6e | of 16) |. 9)..An|
|00003100| 20 65 72 72 6f 72 20 69 | 73 20 72 65 74 75 72 6e | error i|s return|
|00003110| 65 64 20 69 66 20 74 68 | 65 20 77 6f 72 6b 73 70 |ed if th|e worksp|
|00003120| 61 63 65 20 61 72 65 61 | 20 62 65 63 6f 6d 65 73 |ace area| becomes|
|00003130| 20 66 75 6c 6c 2e 00 00 | 44 41 54 41 d3 01 00 00 | full...|DATA....|
|00003140| 43 6f 6d 70 72 65 73 73 | 4a 50 45 47 5f 57 72 69 |Compress|JPEG_Wri|
|00003150| 74 65 4c 69 6e 65 20 20 | 28 26 34 41 35 30 31 29 |teLine |(&4A501)|
|00003160| 0a 45 6e 74 72 79 0a 20 | 09 52 30 20 3d 20 4a 50 |.Entry. |.R0 = JP|
|00003170| 45 47 20 74 61 67 0a 20 | 09 52 31 20 3d 20 70 6f |EG tag. |.R1 = po|
|00003180| 69 6e 74 65 72 20 74 6f | 20 61 20 72 6f 77 20 6f |inter to| a row o|
|00003190| 66 20 70 69 78 65 6c 73 | 3a 0a 20 09 20 09 46 6f |f pixels|:. . .Fo|
|000031a0| 72 20 63 6f 6c 6f 75 72 | 3a 20 61 20 62 75 66 66 |r colour|: a buff|
|000031b0| 65 72 20 6f 66 20 63 6f | 6e 74 69 6e 75 6f 75 73 |er of co|ntinuous|
|000031c0| 20 52 47 42 20 76 61 6c | 75 65 73 20 2d 20 69 65 | RGB val|ues - ie|
|000031d0| 20 61 20 62 79 74 65 20 | 73 74 72 65 61 6d 20 6f | a byte |stream o|
|000031e0| 66 20 74 68 65 20 66 6f | 72 6d 61 74 20 52 2c 20 |f the fo|rmat R, |
|000031f0| 47 2c 20 42 2c 20 52 2c | 20 47 2c 20 42 2e 2e 2e |G, B, R,| G, B...|
|00003200| 0a 20 09 20 09 46 6f 72 | 20 67 72 65 79 73 63 61 |. . .For| greysca|
|00003210| 6c 65 3a 20 61 20 62 75 | 66 66 65 72 20 6f 66 20 |le: a bu|ffer of |
|00003220| 63 6f 6e 74 69 6e 75 6f | 75 73 20 38 20 62 69 74 |continuo|us 8 bit|
|00003230| 20 67 72 65 79 20 76 61 | 6c 75 65 73 0a 45 78 69 | grey va|lues.Exi|
|00003240| 74 0a 20 09 52 30 2c 20 | 52 31 20 70 72 65 73 65 |t. .R0, |R1 prese|
|00003250| 72 76 65 64 0a 0a 54 68 | 69 73 20 63 61 6c 6c 20 |rved..Th|is call |
|00003260| 63 6f 6d 70 72 65 73 73 | 65 73 20 6f 6e 65 20 72 |compress|es one r|
|00003270| 6f 77 20 6f 66 20 73 6f | 75 72 63 65 20 70 69 78 |ow of so|urce pix|
|00003280| 65 6c 73 20 69 6e 74 6f | 20 74 68 65 20 4a 50 45 |els into| the JPE|
|00003290| 47 20 62 75 66 66 65 72 | 2e 20 20 49 74 20 73 68 |G buffer|. It sh|
|000032a0| 6f 75 6c 64 20 62 65 20 | 63 61 6c 6c 65 64 20 6f |ould be |called o|
|000032b0| 6e 63 65 20 66 6f 72 20 | 65 61 63 68 20 72 6f 77 |nce for |each row|
|000032c0| 20 6f 66 20 74 68 65 20 | 73 6f 75 72 63 65 20 64 | of the |source d|
|000032d0| 61 74 61 2e 20 20 41 6e | 20 65 72 72 6f 72 20 69 |ata. An| error i|
|000032e0| 73 20 72 65 74 75 72 6e | 65 64 20 69 66 20 74 68 |s return|ed if th|
|000032f0| 65 20 4a 50 45 47 20 62 | 75 66 66 65 72 20 62 65 |e JPEG b|uffer be|
|00003300| 63 6f 6d 65 73 20 66 75 | 6c 6c 2e 00 44 41 54 41 |comes fu|ll..DATA|
|00003310| 1b 01 00 00 43 6f 6d 70 | 72 65 73 73 4a 50 45 47 |....Comp|ressJPEG|
|00003320| 5f 46 69 6e 69 73 68 20 | 20 28 26 34 41 35 30 32 |_Finish | (&4A502|
|00003330| 29 0a 45 6e 74 72 79 0a | 20 09 52 30 20 3d 20 4a |).Entry.| .R0 = J|
|00003340| 50 45 47 20 74 61 67 0a | 45 78 69 74 0a 20 09 52 |PEG tag.|Exit. .R|
|00003350| 30 20 3d 20 73 69 7a 65 | 20 6f 66 20 4a 50 45 47 |0 = size| of JPEG|
|00003360| 20 69 6d 61 67 65 20 77 | 69 74 68 69 6e 20 74 68 | image w|ithin th|
|00003370| 65 20 62 75 66 66 65 72 | 0a 0a 54 68 69 73 20 63 |e buffer|..This c|
|00003380| 61 6c 6c 20 66 69 6e 69 | 73 68 65 73 20 74 68 65 |all fini|shes the|
|00003390| 20 4a 50 45 47 20 63 6f | 6d 70 72 65 73 73 69 6f | JPEG co|mpressio|
|000033a0| 6e 20 70 72 6f 63 65 73 | 73 2c 20 72 65 74 75 72 |n proces|s, retur|
|000033b0| 6e 69 6e 67 20 74 68 65 | 20 73 69 7a 65 20 6f 66 |ning the| size of|
|000033c0| 20 74 68 65 20 63 6f 6d | 70 6c 65 74 65 20 69 6d | the com|plete im|
|000033d0| 61 67 65 2e 20 20 41 6e | 79 20 77 6f 72 6b 73 70 |age. An|y worksp|
|000033e0| 61 63 65 20 63 6c 61 69 | 6d 65 64 20 62 79 20 74 |ace clai|med by t|
|000033f0| 68 65 20 43 6f 6d 70 72 | 65 73 73 4a 50 45 47 20 |he Compr|essJPEG |
|00003400| 6d 6f 64 75 6c 65 20 66 | 6f 72 20 74 68 65 20 63 |module f|or the c|
|00003410| 6f 6d 70 72 65 73 73 69 | 6f 6e 20 69 73 20 72 65 |ompressi|on is re|
|00003420| 6c 65 61 73 65 64 2e 00 | 44 41 54 41 24 00 00 00 |leased..|DATA$...|
|00003430| 23 43 6f 6d 6d 61 6e 64 | 73 0a 66 53 74 64 0a 57 |#Command|s.fStd.W|
|00003440| 72 61 70 20 4f 6e 0a 23 | 45 6e 64 0a 44 41 54 41 |rap On.#|End.DATA|
|00003450| 20 00 00 00 00 40 2d e9 | 00 e0 d0 e5 58 00 5e e3 | ....@-.|....X.^.|
|00003460| 78 00 5e 13 01 00 80 02 | 00 80 fd e8 44 41 54 41 |x.^.....|....DATA|
|00003470| f0 01 00 00 4a 50 45 47 | 0a 23 50 61 72 65 6e 74 |....JPEG|.#Parent|
|00003480| 20 53 74 72 6f 6e 67 48 | 65 6c 70 3a 21 4d 65 6e | StrongH|elp:!Men|
|00003490| 75 0a 23 50 72 65 66 69 | 78 20 4a 50 45 47 5f 0a |u.#Prefi|x JPEG_.|
|000034a0| 23 42 61 63 6b 67 72 6f | 75 6e 64 20 57 69 6d 70 |#Backgro|und Wimp|
|000034b0| 20 31 0a 23 66 48 31 3a | 4a 50 45 47 0a 23 4c 69 | 1.#fH1:|JPEG.#Li|
|000034c0| 6e 65 0a 23 66 48 32 3a | 53 70 72 69 74 65 45 78 |ne.#fH2:|SpriteEx|
|000034d0| 74 65 6e 64 20 30 2e 39 | 39 0a 23 4c 69 6e 65 0a |tend 0.9|9.#Line.|
|000034e0| 23 54 61 62 6c 65 20 43 | 6f 6c 75 6d 6e 73 20 32 |#Table C|olumns 2|
|000034f0| 0a 3c 46 69 6c 65 49 6e | 66 6f 3e 0a 3c 49 6e 66 |.<FileIn|fo>.<Inf|
|00003500| 6f 3e 0a 3c 50 44 72 69 | 76 65 72 49 6e 74 65 72 |o>.<PDri|verInter|
|00003510| 63 65 70 74 3e 0a 3c 50 | 6c 6f 74 46 69 6c 65 53 |cept>.<P|lotFileS|
|00003520| 63 61 6c 65 64 3e 0a 3c | 50 6c 6f 74 46 69 6c 65 |caled>.<|PlotFile|
|00003530| 54 72 61 6e 73 66 6f 72 | 6d 65 64 3e 0a 3c 50 6c |Transfor|med>.<Pl|
|00003540| 6f 74 53 63 61 6c 65 64 | 3e 0a 3c 50 6c 6f 74 54 |otScaled|>.<PlotT|
|00003550| 72 61 6e 73 66 6f 72 6d | 65 64 3e 0a 23 45 6e 64 |ransform|ed>.#End|
|00003560| 54 61 62 6c 65 0a 23 4c | 69 6e 65 0a 23 66 48 32 |Table.#L|ine.#fH2|
|00003570| 3a 43 6f 6d 70 72 65 73 | 73 4a 50 45 47 20 30 2e |:Compres|sJPEG 0.|
|00003580| 30 34 0a 23 4c 69 6e 65 | 0a 23 54 61 62 6c 65 20 |04.#Line|.#Table |
|00003590| 43 6f 6c 75 6d 6e 73 20 | 33 0a 3c 46 69 6e 69 73 |Columns |3.<Finis|
|000035a0| 68 3d 3e 43 6f 6d 70 72 | 65 73 73 4a 50 45 47 5f |h=>Compr|essJPEG_|
|000035b0| 46 69 6e 69 73 68 3e 0a | 3c 53 74 61 72 74 3d 3e |Finish>.|<Start=>|
|000035c0| 43 6f 6d 70 72 65 73 73 | 4a 50 45 47 5f 53 74 61 |Compress|JPEG_Sta|
|000035d0| 72 74 3e 0a 3c 57 72 69 | 74 65 4c 69 6e 65 3d 3e |rt>.<Wri|teLine=>|
|000035e0| 43 6f 6d 70 72 65 73 73 | 4a 50 45 47 5f 57 72 69 |Compress|JPEG_Wri|
|000035f0| 74 65 4c 69 6e 65 3e 0a | 23 45 6e 64 54 61 62 6c |teLine>.|#EndTabl|
|00003600| 65 0a 23 4c 69 6e 65 3b | 41 6c 69 67 6e 20 43 65 |e.#Line;|Align Ce|
|00003610| 6e 74 72 65 3b 57 72 61 | 70 20 4f 66 66 0a 62 79 |ntre;Wra|p Off.by|
|00003620| 20 3c 44 61 76 69 64 20 | 54 68 6f 6d 61 73 3d 3e | <David |Thomas=>|
|00003630| 46 69 6c 65 74 79 70 65 | 73 3a 41 75 74 68 6f 72 |Filetype|s:Author|
|00003640| 73 5f 44 61 76 65 54 68 | 6f 6d 61 73 3e 2c 20 31 |s_DaveTh|omas>, 1|
|00003650| 30 74 68 20 4a 75 6e 20 | 31 39 39 36 |0th Jun |1996 |
+--------+-------------------------+-------------------------+--------+--------+